Updated exception

This commit is contained in:
Brad Arant 2023-03-10 12:55:08 -08:00
parent 2a8cfcee2a
commit b873bbf164
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,7 @@ namespace coreutils {
else else
this->errorNumber = errorNumber; this->errorNumber = errorNumber;
Log(LOG_EXCEPT) << text; Log(LOG_EXCEPT) << text << "(" << file << ":" << line << ")";
} }
} }

View File

@ -3,13 +3,14 @@
#include <string.h> #include <string.h>
#include <string> #include <string>
#include <errno.h>
namespace coreutils { namespace coreutils {
class Exception { class Exception {
public: public:
Exception(std::string text, std::string file = __FILE__, int line = __LINE__, int errorNumber = -1); Exception(std::string text, std::string file = __FILE__, int line = __LINE__, int errorNumber = errno);
std::string className; std::string className;
std::string file; std::string file;