Flow123d
JS_before_hm-2087-gb06a8f5d8
|
Go to the documentation of this file.
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_info(std::ostringstream &out) const override
Print formatted assert message.
static StreamMask log
Predefined mask of log file output.
Assert & set_context(const char *file_name, const char *function, const int line)
Stores values for printing out line number, function, etc.
std::ostringstream & form_message(std::ostringstream &) const override
Override ExceptionBase::form_message()
std::string what_type_msg() const override
Override ExceptionBase::what_type_msg()
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
Exc_assert exception_
Exception object.
Class defining debugging messages.
std::string expression_
Assertion expression.
std::string file_name_
Actual file.
std::string what_type_msg_
String representation of message type (Program error, Warning, ...)
void error(std::string error_msg="")
Generate error with given message.
const char * what() const
#define WarningOut()
Macro defining 'warning' record of log.
std::vector< std::string > current_val_
Formated strings of names and values of given variables.
std::string function_
Actual function.
bool thrown_
Flag marked if Assert thrown error, warning, ...
void warning(std::string warning_msg="")
Generate warning with given message.
void print_stacktrace(std::ostream &out) const
Prints formated stacktrace into given stream out.