![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Forms the root of the entire exception hierarchy. Inherits from std::exception and implements what() interface. More...
#include <Standard_Failure.hxx>

Public Member Functions | |
| 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. | |
Static Public Member Functions | |
| static int | DefaultStackTraceLength () |
| Returns the default length of stack trace to be captured by Standard_Failure constructor; 0 by default meaning no stack trace. | |
| static void | SetDefaultStackTraceLength (int theNbStackTraces) |
| Sets default length of stack trace to be captured by Standard_Failure constructor. | |
Forms the root of the entire exception hierarchy. Inherits from std::exception and implements what() interface.
| Standard_Failure::Standard_Failure | ( | ) |
Creates a status object of type "Failure".
| Standard_Failure::Standard_Failure | ( | const Standard_Failure & | theOther | ) |
Copy constructor.
| Standard_Failure::Standard_Failure | ( | const char * | theMessage | ) |
Creates a status object of type "Failure" with message.
| [in] | theMessage | exception description |
| Standard_Failure::Standard_Failure | ( | const char *const | theMessage, |
| const char *const | theStackTrace ) |
Creates a status object of type "Failure" with message and stack trace.
| [in] | theMessage | exception description |
| [in] | theStackTrace | stack trace string |
|
override |
Destructor.
Returns the default length of stack trace to be captured by Standard_Failure constructor; 0 by default meaning no stack trace.
Returns the exception type name. Default implementation returns "Standard_Failure". Derived classes override this to return their own type name.
|
inlinenoexcept |
Returns error message.
| const char * Standard_Failure::GetStackString | ( | ) | const |
Returns the stack trace string (empty string if not available).
| Standard_Failure & Standard_Failure::operator= | ( | const Standard_Failure & | theOther | ) |
Assignment operator.
| void Standard_Failure::Print | ( | Standard_OStream & | theStream | ) | const |
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&)
Sets default length of stack trace to be captured by Standard_Failure constructor.
|
overridenoexcept |
Returns error message (implements std::exception interface). Returns empty string "" if no message was set.