v0.14.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]
Collaboration 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 20 of file Exceptions.hpp.

Constructor & Destructor Documentation

◆ MoFEMException() [1/3]

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

Definition at line 23 of file Exceptions.hpp.

24  : MoFEMException(static_cast<int>(error_code)) {}

◆ MoFEMException() [2/3]

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

Definition at line 25 of file Exceptions.hpp.

26  : errorCode(error_code) {
27  strncpy(errorMessage, error_message, sizeof(errorMessage));
28  errorMessage[sizeof(errorMessage) - 1] = '\0';
29  }

◆ MoFEMException() [3/3]

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

Definition at line 33 of file Exceptions.hpp.

33  : errorCode(error_code) {
34  strcpy(errorMessage, "Houston we have a problem, something is wrong");
35  }

Member Function Documentation

◆ what()

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

Definition at line 30 of file Exceptions.hpp.

30 { return errorMessage; }

Member Data Documentation

◆ errorCode

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

Definition at line 21 of file Exceptions.hpp.

◆ errorMessage

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

Definition at line 22 of file Exceptions.hpp.


The documentation for this struct was generated from the following file:
MoFEM::Exceptions::MoFEMException::MoFEMException
MoFEMException(const MoFEMErrorCodes error_code)
Definition: Exceptions.hpp:23
MoFEM::Exceptions::MoFEMException::errorMessage
char errorMessage[1024]
Definition: Exceptions.hpp:22
MoFEM::Exceptions::MoFEMException::errorCode
const int errorCode
Definition: Exceptions.hpp:21