www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
MooseException Class Reference

Provides a way for users to bail out of the current solve. More...

#include <MooseException.h>

Inheritance diagram for MooseException:
[legend]

Public Member Functions

 MooseException (std::string message)
 
 MooseException (const MooseException &)=default
 Set an explicit default constructor to avoid the variadic template constructor below catch the copy construction case. More...
 
template<typename... Args>
 MooseException (Args &&... args)
 
 ~MooseException () throw ()
 For some reason, on GCC 4.6.3, I get 'error: looser throw specifier' when deriving from std::exception unless I declare that the destructor won't throw by adding the throw() specification. More...
 
virtual const char * what () const throw ()
 Get out the error message. More...
 

Protected Attributes

std::string _message
 

Detailed Description

Provides a way for users to bail out of the current solve.

Definition at line 20 of file MooseException.h.

Constructor & Destructor Documentation

◆ MooseException() [1/3]

MooseException::MooseException ( std::string  message)
inline
Parameters
messageThe message to display

Definition at line 26 of file MooseException.h.

26 : _message(message) {}
std::string _message

◆ MooseException() [2/3]

MooseException::MooseException ( const MooseException )
default

Set an explicit default constructor to avoid the variadic template constructor below catch the copy construction case.

◆ MooseException() [3/3]

template<typename... Args>
MooseException::MooseException ( Args &&...  args)
inlineexplicit
Parameters
argsList of arguments that gets stringified and concatenated to form the message to display

Definition at line 39 of file MooseException.h.

40  {
41  std::ostringstream ss;
42  streamArguments(ss, args...);
43  _message = ss.str();
44  }
void streamArguments(StreamType &)
std::string _message

◆ ~MooseException()

MooseException::~MooseException ( )
throw (
)
inline

For some reason, on GCC 4.6.3, I get 'error: looser throw specifier' when deriving from std::exception unless I declare that the destructor won't throw by adding the throw() specification.

Clang doesn't seem to care about this line of code.

Definition at line 53 of file MooseException.h.

53 {}

Member Function Documentation

◆ what()

virtual const char* MooseException::what ( ) const
throw (
)
inlinevirtual

Member Data Documentation

◆ _message

std::string MooseException::_message
protected

Definition at line 63 of file MooseException.h.

Referenced by MooseException(), and what().


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