Gromacs
2026.0-dev-20241106-9ba7f4d
|
#include <testutils/include/testutils/testexceptions.h>
Exception class for reporting errors in tests.
This exception should be used for error conditions that are internal to the test, i.e., do not indicate errors in the tested code.
Public Member Functions | |
TestException (const std::string &reason) | |
Creates a test exception object with the provided detailed reason. More... | |
TestException (const GromacsException &base) | |
Creates a test exception based on another GromacsException object. More... | |
int | errorCode () const override |
Returns the error code corresponding to the exception type. | |
Public Member Functions inherited from gmx::GromacsException | |
GromacsException (const GromacsException &)=default | |
GromacsException (GromacsException &&) noexcept=default | |
GromacsException & | operator= (const GromacsException &)=default |
GromacsException & | operator= (GromacsException &&) noexcept=default |
const char * | what () const noexceptoverride |
Returns the reason string for the exception. More... | |
template<class InfoType > | |
const InfoType::value_type * | getInfo () const |
Returns the value associated with given ExceptionInfo. More... | |
template<class Tag , typename T > | |
void | setInfo (const ExceptionInfo< Tag, T > &item) |
Associates extra information with the exception. More... | |
void | prependContext (const std::string &context) |
Adds context information to this exception. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from gmx::GromacsException | |
GromacsException (const ExceptionInitializer &details) | |
Creates an exception object with the provided initializer/reason. More... | |
|
inlineexplicit |
Creates a test exception object with the provided detailed reason.
[in] | reason | Detailed reason for the exception. |
|
inlineexplicit |
Creates a test exception based on another GromacsException object.
[in] | base | Exception to wrap. |