diff --git a/Exception.cpp b/Exception.cpp index 22eebb4..29a05c5 100644 --- a/Exception.cpp +++ b/Exception.cpp @@ -12,7 +12,7 @@ namespace coreutils { else this->errorNumber = errorNumber; - Log(LOG_EXCEPT) << text; + Log(LOG_EXCEPT) << text << "(" << file << ":" << line << ")"; } } diff --git a/Exception.h b/Exception.h index ac803de..93ce519 100644 --- a/Exception.h +++ b/Exception.h @@ -3,13 +3,14 @@ #include #include +#include namespace coreutils { class Exception { 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 file;