47 #include "DataTransferKitUtils_config.hpp" 68 : std::logic_error( msg )
84 : std::logic_error( generate_output( cond, file, line ) )
93 std::string generate_output(
const std::string &cond,
94 const std::string &file,
95 const int line )
const;
103 const std::string &file,
const int line );
107 const int line,
const int error_code );
144 #define DTK_REQUIRE( c ) \ 146 DataTransferKit::throwDataTransferKitException( #c, __FILE__, __LINE__ ) 147 #define DTK_ENSURE( c ) \ 149 DataTransferKit::throwDataTransferKitException( #c, __FILE__, __LINE__ ) 150 #define DTK_CHECK( c ) \ 152 DataTransferKit::throwDataTransferKitException( #c, __FILE__, __LINE__ ) 153 #define DTK_REMEMBER( c ) c 154 #define DTK_CHECK_ERROR_CODE( c ) \ 159 DataTransferKit::errorCodeFailure( #c, __FILE__, __LINE__, ec ); \ 164 #define DTK_REQUIRE( c ) 165 #define DTK_ENSURE( c ) 166 #define DTK_CHECK( c ) 167 #define DTK_REMEMBER( c ) 168 #define DTK_CHECK_ERROR_CODE( c ) c 171 #define DTK_INSIST( c ) \ 173 DataTransferKit::throwDataTransferKitException( #c, __FILE__, __LINE__ ) 177 #endif // end DTK_DBC_HPP Base class for DTK assertions. This structure is heavily based on that in Nemesis developed by Tom Ev...
DataTransferKitException(const std::string &msg)
Default constructor.
void throwDataTransferKitException(const std::string &cond, const std::string &file, const int line)
Throw a DataTransferKit::DataTransferKitException.
virtual ~DataTransferKitException()
Destructor.
DataTransferKitException(const std::string &cond, const std::string &file, const int line)
DBC constructor.
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.