31 what_type_msg_(
"Program Error: Violated assert! ") {}
36 out << std::endl <<
"> In file: " <<
file_name_ <<
"(" <<
line_ <<
"): Throw in function " <<
function_ << std::endl;
37 out <<
"> Expression: \'" <<
expression_ <<
"\'" <<
"\n";
39 out <<
"> Values:" << std::endl;
41 out <<
" " << val << std::endl;
54 converter <<
"--------------------------------------------------------" << std::endl;
59 converter << std::endl <<
"--------------------------------------------------------" << std::endl;
99 std::ostringstream info_str, stack_str;
void print_stacktrace(std::ostream &out) const
Prints formated stacktrace into given stream out.
const char * what() const
static StreamMask log
Predefined mask of log file output.
Class defining debugging messages.
void error(std::string error_msg="")
Generate error with given message.
Assert & set_context(const char *file_name, const char *function, const int line)
Stores values for printing out line number, function, etc.
bool thrown_
Flag marked if Assert thrown error, warning, ...
void warning(std::string warning_msg="")
Generate warning with given message.
Exc_assert exception_
Exception object.
std::vector< std::string > current_val_
Formated strings of names and values of given variables.
void print_info(std::ostringstream &out) const override
Print formatted assert message.
std::string what_type_msg() const override
Override ExceptionBase::what_type_msg()
std::string function_
Actual function.
std::string what_type_msg_
String representation of message type (Program error, Warning, ...)
std::string expression_
Assertion expression.
std::string file_name_
Actual file.
std::ostringstream & form_message(std::ostringstream &) const override
Override ExceptionBase::form_message()
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
#define WarningOut()
Macro defining 'warning' record of log.