1 #ifndef _ERRORSHELPER_H_ 2 #define _ERRORSHELPER_H_ 8 size_t colons = prettyFunction.find(
"::");
9 size_t begin = prettyFunction.substr(0,colons).rfind(
" ") + 1;
10 size_t end = prettyFunction.rfind(
"(") - begin;
12 return "[" + prettyFunction.substr(begin,end) +
"()" "]";
15 #define __FULL_METHOD_NAME__ fullMethodName(__PRETTY_FUNCTION__) 32 #define OCRA_ERROR(msg) \ 33 std::cout << "\033[1;93;41m[ERROR]" << __FULL_METHOD_NAME__ << "\033[0m" << std::endl << msg << std::endl; 35 #define OCRA_WARNING(msg) \ 36 std::cout << "\033[1;97;42m[WARNING]" << __FULL_METHOD_NAME__ << "\033[0m" << std::endl << msg << std::endl; 38 #define OCRA_INFO(msg) \ 39 std::cout << "\033[1;97;40m[INFO]" << __FULL_METHOD_NAME__ << "\033[0m" << std::endl << msg << std::endl; std::string fullMethodName(const std::string &prettyFunction)