Gromacs  2018.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Protected Member Functions
gmx::UserInputError Class Reference

#include <gromacs/utility/exceptions.h>

+ Inheritance diagram for gmx::UserInputError:
+ Collaboration diagram for gmx::UserInputError:

Description

Exception class for user input errors.

Derived classes should be used to indicate the nature of the error instead of throwing this class directly.

Protected Member Functions

 UserInputError (const ExceptionInitializer &details)
 Creates an exception object with the provided initializer/reason. More...
 
- Protected Member Functions inherited from gmx::GromacsException
 GromacsException (const ExceptionInitializer &details)
 Creates an exception object with the provided initializer/reason. More...
 

Additional Inherited Members

- Public Member Functions inherited from gmx::GromacsException
virtual const char * what () const noexcept
 Returns the reason string for the exception. More...
 
virtual int errorCode () const =0
 Returns the error code corresponding to the exception type.
 
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...
 

Constructor & Destructor Documentation

gmx::UserInputError::UserInputError ( const ExceptionInitializer details)
inlineexplicitprotected

Creates an exception object with the provided initializer/reason.

Parameters
[in]detailsInitializer for the exception.
Exceptions
std::bad_allocif out of memory.

It is possible to call this constructor either with an explicit ExceptionInitializer object (useful for more complex cases), or a simple string if only a reason string needs to be provided.


The documentation for this class was generated from the following file: