Closed mharshe closed 3 years ago
In Linux, the exceptions thrown using std::strerror (in file_utils.cpp) are caught in the DmiInfo class by value using std::string e. This is not caught correctly because std::strerror returns a char *.
std::strerror
file_utils.cpp
std::string e
char *
I suggest changing this to throw like this:
throw(std::runtime_error(std::strerror(errno)));
and catch the exceptions using:
catch (const std::exception& e)
In Linux, the exceptions thrown using
std::strerror
(infile_utils.cpp
) are caught in the DmiInfo class by value usingstd::string e
. This is not caught correctly becausestd::strerror
returns achar *
.I suggest changing this to throw like this:
and catch the exceptions using: