v0.10.0
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
MoFEM::Exceptions::MoFEMException Struct Reference

Exception to catch. More...

#include <include/Exceptions.hpp>

Inheritance diagram for MoFEM::Exceptions::MoFEMException:
[legend]

Public Member Functions

 MoFEMException (const MoFEMErrorCodes error_code)
 
 MoFEMException (const MoFEMErrorCodes error_code, const char error_message[])
 
const char * what () const throw ()
 

Public Attributes

const int errorCode
 
char errorMessage [1024]
 

Protected Member Functions

 MoFEMException (const int error_code)
 

Detailed Description

Exception to catch.

Definition at line 31 of file Exceptions.hpp.

Constructor & Destructor Documentation

◆ MoFEMException() [1/3]

MoFEM::Exceptions::MoFEMException::MoFEMException ( const MoFEMErrorCodes  error_code)

Definition at line 34 of file Exceptions.hpp.

35  : MoFEMException(static_cast<int>(error_code)) {}
MoFEMException(const MoFEMErrorCodes error_code)
Definition: Exceptions.hpp:34

◆ MoFEMException() [2/3]

MoFEM::Exceptions::MoFEMException::MoFEMException ( const MoFEMErrorCodes  error_code,
const char  error_message[] 
)

Definition at line 36 of file Exceptions.hpp.

37  : errorCode(error_code) {
38  strncpy(errorMessage, error_message, sizeof(errorMessage));
39  errorMessage[sizeof(errorMessage) - 1] = '\0';
40  }

◆ MoFEMException() [3/3]

MoFEM::Exceptions::MoFEMException::MoFEMException ( const int  error_code)
protected

Definition at line 44 of file Exceptions.hpp.

44  : errorCode(error_code) {
45  strcpy(errorMessage, "Houston we have a problem, something is wrong");
46  }

Member Function Documentation

◆ what()

const char* MoFEM::Exceptions::MoFEMException::what ( ) const
throw (
)

Definition at line 41 of file Exceptions.hpp.

41 { return errorMessage; }

Member Data Documentation

◆ errorCode

const int MoFEM::Exceptions::MoFEMException::errorCode

Definition at line 32 of file Exceptions.hpp.

◆ errorMessage

char MoFEM::Exceptions::MoFEMException::errorMessage[1024]

Definition at line 33 of file Exceptions.hpp.


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