CoreUtils/Exception.cpp
2023-03-10 12:55:08 -08:00

19 lines
416 B
C++

#include "Exception.h"
#include "Log.h"
namespace coreutils {
Exception::Exception(std::string text, std::string file, int line, int errorNumber) {
this->text = text;
this->file = file;
this->line = line;
if(errorNumber == -1)
this->errorNumber = errno;
else
this->errorNumber = errorNumber;
Log(LOG_EXCEPT) << text << "(" << file << ":" << line << ")";
}
}