Forms the root of the entire exception hierarchy. Inherits from std::exception and implements what() interface.
More...
#include <Standard_Failure.hxx>
|
| | Standard_Failure () |
| | Creates a status object of type "Failure".
|
| | Standard_Failure (const Standard_Failure &theOther) |
| | Copy constructor.
|
| | Standard_Failure (const char *theMessage) |
| | Creates a status object of type "Failure" with message.
|
| | Standard_Failure (const char *const theMessage, const char *const theStackTrace) |
| | Creates a status object of type "Failure" with message and stack trace.
|
| Standard_Failure & | operator= (const Standard_Failure &theOther) |
| | Assignment operator.
|
| | ~Standard_Failure () override |
| | Destructor.
|
| const char * | what () const noexcept override |
| | Returns error message (implements std::exception interface). Returns empty string "" if no message was set.
|
| const char * | GetMessageString () const noexcept |
| | Returns error message.
|
| virtual const char * | ExceptionType () const noexcept |
| | Returns the exception type name. Default implementation returns "Standard_Failure". Derived classes override this to return their own type name.
|
| const char * | GetStackString () const |
| | Returns the stack trace string (empty string if not available).
|
| void | Print (Standard_OStream &theStream) const |
| | Prints on the stream theStream the exception name followed by the error message.
|
Forms the root of the entire exception hierarchy. Inherits from std::exception and implements what() interface.
◆ Standard_Failure() [1/4]
| Standard_Failure::Standard_Failure |
( |
| ) |
|
Creates a status object of type "Failure".
◆ Standard_Failure() [2/4]
◆ Standard_Failure() [3/4]
| Standard_Failure::Standard_Failure |
( |
const char * | theMessage | ) |
|
Creates a status object of type "Failure" with message.
- Parameters
-
| [in] | theMessage | exception description |
◆ Standard_Failure() [4/4]
| Standard_Failure::Standard_Failure |
( |
const char *const | theMessage, |
|
|
const char *const | theStackTrace ) |
Creates a status object of type "Failure" with message and stack trace.
- Parameters
-
| [in] | theMessage | exception description |
| [in] | theStackTrace | stack trace string |
◆ ~Standard_Failure()
| Standard_Failure::~Standard_Failure |
( |
| ) |
|
|
override |
◆ DefaultStackTraceLength()
| int Standard_Failure::DefaultStackTraceLength |
( |
| ) |
|
|
static |
Returns the default length of stack trace to be captured by Standard_Failure constructor; 0 by default meaning no stack trace.
◆ ExceptionType()
| virtual const char * Standard_Failure::ExceptionType |
( |
| ) |
const |
|
inlinevirtualnoexcept |
Returns the exception type name. Default implementation returns "Standard_Failure". Derived classes override this to return their own type name.
◆ GetMessageString()
| const char * Standard_Failure::GetMessageString |
( |
| ) |
const |
|
inlinenoexcept |
Returns error message.
- Deprecated
- ("Use what() instead")
◆ GetStackString()
| const char * Standard_Failure::GetStackString |
( |
| ) |
const |
Returns the stack trace string (empty string if not available).
◆ operator=()
◆ Print()
Prints on the stream theStream the exception name followed by the error message.
Note: there is a short-cut operator<< (Standard_OStream&, const Standard_Failure&)
◆ SetDefaultStackTraceLength()
| void Standard_Failure::SetDefaultStackTraceLength |
( |
int | theNbStackTraces | ) |
|
|
static |
Sets default length of stack trace to be captured by Standard_Failure constructor.
◆ what()
| const char * Standard_Failure::what |
( |
| ) |
const |
|
overridenoexcept |
Returns error message (implements std::exception interface). Returns empty string "" if no message was set.
The documentation for this class was generated from the following file: