14 #if !defined(KRATOS_EXCEPTION_H_INCLUDED )
15 #define KRATOS_EXCEPTION_H_INCLUDED
48 :
public std::exception
61 explicit Exception(
const std::string& rWhat );
83 template<
class StreamValueType>
86 std::stringstream buffer;
89 append_message(buffer.str());
103 void append_message(std::string
const& rMessage);
105 void add_to_call_stack(
CodeLocation const& TheLocation);
116 const char* what()
const noexcept override;
130 virtual
void PrintInfo(
std::ostream& rOStream)
const;
133 virtual
void PrintData(
std::ostream& rOStream)
const;
142 std::
string mMessage;
161 #define KRATOS_ERROR throw Kratos::Exception("Error: ", KRATOS_CODE_LOCATION)
162 #define KRATOS_ERROR_IF(conditional) if(conditional) KRATOS_ERROR
163 #define KRATOS_ERROR_IF_NOT(conditional) if(!(conditional)) KRATOS_ERROR
166 #define KRATOS_DEBUG_ERROR KRATOS_ERROR
167 #define KRATOS_DEBUG_ERROR_IF(conditional) KRATOS_ERROR_IF(conditional)
168 #define KRATOS_DEBUG_ERROR_IF_NOT(conditional) KRATOS_ERROR_IF_NOT(conditional)
170 #define KRATOS_DEBUG_ERROR if(false) KRATOS_ERROR
171 #define KRATOS_DEBUG_ERROR_IF(conditional) if(false) KRATOS_ERROR_IF(conditional)
172 #define KRATOS_DEBUG_ERROR_IF_NOT(conditional) if(false) KRATOS_ERROR_IF_NOT(conditional)
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
Definition: code_location.h:31
Extends the std::exception class with more information about error location.
Definition: exception.h:49
Exception & operator=(Exception const &rOther)=delete
Assignment operator is deleted.
#define KRATOS_API(...)
Definition: kratos_export_api.h:40
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
tuple const
Definition: ode_solve.py:403
namespace
Definition: array_1d.h:793