Skip to content
Snippets Groups Projects
Commit 5957dd86 authored by Martin Beseda's avatar Martin Beseda
Browse files

FIX: Fixed ERR_MSG macro for Release compile mode.

parent 84196338
No related branches found
No related tags found
No related merge requests found
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
#ifdef L4N_DEBUG #ifdef L4N_DEBUG
#define ERR_MSG(msg) std::string(boost::typeindex::type_id_with_cvr<decltype(*this)>().pretty_name()) + "::" + __func__ + "(): " + msg + " (" +__FILE__ + ":" + std::to_string(__LINE__) + ")" #define ERR_MSG(msg) std::string(boost::typeindex::type_id_with_cvr<decltype(*this)>().pretty_name()) + "::" + __func__ + "(): " + msg + " (" +__FILE__ + ":" + std::to_string(__LINE__) + ")"
#else #else
#define ERR_MSG(msg) std::string(boost::typeindex::type_id_with_cvr<decltype(*this)>().pretty_name()) + "::" + __func__ + "(): " + msg #define ERR_MSG(msg) std::string(boost::typeindex::type_id_with_cvr<decltype(*this)>().pretty_name()) + "::" + __func__ + "(): " + msg + ""
#endif // L4N_DEBUG #endif // L4N_DEBUG
#define THROW_RUNTIME_ERROR(msg) throw std::runtime_error(ERR_MSG(msg)) // Errors, that can't be detected by looking at the code #define THROW_RUNTIME_ERROR(msg) throw std::runtime_error(ERR_MSG(msg)) // Errors, that can't be detected by looking at the code
#define THROW_LOGIC_ERROR(msg) throw std::logic_error(ERR_MSG(msg)) // Errors, that can be detected by looking at the code #define THROW_LOGIC_ERROR(msg) throw std::logic_error(ERR_MSG(msg)) // Errors, that can be detected by looking at the code
#define THROW_INVALID_ARGUMENT_ERROR(msg) throw std::invalid_argument(ERR_MSG(msg)) #define THROW_INVALID_ARGUMENT_ERROR(msg) throw std::invalid_argument(ERR_MSG(msg))
#define THROW_NOT_IMPLEMENTED_ERROR(msg) throw std::logic_error(ERR_MSG("This function is not implemented." + msg)) #define THROW_NOT_IMPLEMENTED_ERROR(msg) throw std::logic_error(ERR_MSG("This function is not implemented. " + msg))
#define THROW_OUT_OF_RANGE_ERROR(msg) throw std::out_of_range(ERR_MSG(msg)) #define THROW_OUT_OF_RANGE_ERROR(msg) throw std::out_of_range(ERR_MSG(msg))
#endif //LIB4NEURO_EXCEPTIONS_H #endif //LIB4NEURO_EXCEPTIONS_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment