45 #include <Teuchos_stacktrace.hpp> 64 std::string DataTransferKitException::generate_output(
const std::string &cond,
65 const std::string &file,
66 const int line )
const 68 std::ostringstream output;
69 output <<
"DataTransferKit DataTransferKitException: " << cond
70 <<
", failed in " << file <<
", line " << line <<
"." << std::endl;
88 const std::string &file,
const int line )
90 #ifdef HAVE_TEUCHOS_STACKTRACE 93 Teuchos::store_stacktrace();
113 const int line,
const int error_code )
115 #ifdef HAVE_TEUCHOS_STACKTRACE 118 Teuchos::store_stacktrace();
120 std::ostringstream output_msg;
121 output_msg <<
"Error code : " << cond <<
", failed in " << file <<
":" 123 <<
"with error code:" << std::endl
124 <<
"\"" << error_code <<
"\"" << std::endl;
DataTransferKitException(const std::string &msg)
Default constructor.
void throwDataTransferKitException(const std::string &cond, const std::string &file, const int line)
Throw a DataTransferKit::DataTransferKitException.
Assertions and Design-by-Contract for error handling.
void errorCodeFailure(const std::string &cond, const std::string &file, const int line, const int error_code)
Throw a DataTransferKit::DataTransferKitException when an error code fails.