19 explicit MaCh3Exception(std::string File,
int Line, std::string Message =
"")
21 size_t lastSlashPos = File.find_last_of(
'/');
22 std::string fileName = (lastSlashPos != std::string::npos) ? File.substr(lastSlashPos + 1) : File;
24 errorMessage = ((Message.empty()) ?
"Terminating MaCh3" : Message);
26 spdlog::set_pattern(
"[%^%l%$] %v");
32 const char*
what() const noexcept
override {
KS: Based on this https://github.com/gabime/spdlog/blob/a2b4262090fd3f005c2315dcb5be2f0f1774a005/incl...
Custom exception class for MaCh3 errors.
const char * what() const noexcept override
Returns the error message associated with this exception.
MaCh3Exception(std::string File, int Line, std::string Message="")
Constructs a MaCh3Exception object with the specified error message.
std::string errorMessage
The error message associated with this exception.