-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdebugMisc.cpp
17 lines (14 loc) · 1.08 KB
/
debugMisc.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "debugMisc.hpp"
#include <string>
[[maybe_unused]] [[noreturn]] void throwDevError( const std::string &t_errorMessage, const int t_lineNum, const std::string &t_filePath, const std::string &t_functionName )
{
throw std::runtime_error( "ERROR" + t_errorMessage + " (In file [" + t_filePath + "] on line number " + std::to_string( t_lineNum ) + " in function " + t_functionName + ")\n" );
}
[[maybe_unused]] void throwDevWarning( const std::string &t_errorMessage, const int t_lineNum, const std::string &t_filePath, const std::string &t_functionName )
{
std::cerr << "WARNING: " << t_errorMessage << " (In file [" << t_filePath << "] on line number " << std::to_string( t_lineNum ) << " in function " << t_functionName << ")" << std::endl;
}
[[maybe_unused]] void throwDevMessage( const std::string &t_errorMessage, const int t_lineNum, const std::string &t_filePath, const std::string &t_functionName )
{
std::cout << "INFO: " << t_errorMessage << " (In file [" << t_filePath << "] on line number " << std::to_string( t_lineNum ) << " in function " << t_functionName << ")" << "\n\n";
}