# FoundationClasses
TKernel
Standard

# Standard_Failure Class Reference

Forms the root of the entire exception hierarchy.
.

`#include <Standard_Failure.hxx>`

Inheritance diagram for Standard_Failure:

[legend]

## Public Member Functions

Standard_EXPORT | Standard_Failure ()
| Creates a status object of type "Failure". .
Standard_EXPORT | Standard_Failure (const Standard_Failure &f)
Standard_EXPORT | Standard_Failure (const Standard_CString aString)
| Creates a status object of type "Failure". .
Standard_EXPORT Standard_Failure & | operator= (const Standard_Failure &f)
Standard_EXPORT void | Destroy ()
| ~Standard_Failure ()
Standard_EXPORT void | Print (Standard_OStream &s) const
| Prints on the stream <s> the exception name followed by the error message. Level: Advanced Warning: The operator "OStream& operator<< (Standard_OStream&, <br> Handle(Standard_Failure)&)" is implemented. (This operator uses the method Print) .
void | operator<< (Standard_OStream &s) const
Standard_CString | GetMessageString () const
| Returns error message .
Standard_EXPORT void | SetMessageString (const Standard_CString aMessage)
| Sets error message .
Standard_EXPORT void | Reraise ()
Standard_EXPORT void | Reraise (const Standard_CString aMessage)
| Reraises a caught exception and changes its error message. .
Standard_EXPORT void | Jump () const
| Used to throw CASCADE exception from C signal handler. On platforms that do not allow throwing C++ exceptions from this handler (e.g. Linux), uses longjump to get to the current active signal handler, and only then is converted to C++ exception. .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Static Public Member Functions

static Standard_EXPORT void | Raise (const Standard_CString aMessage="")
| Raises an exception of type "Failure" and associates an error message to it. The message can be printed in an exception handler. .
static Standard_EXPORT void | Raise (Standard_SStream &aReason)
| Raises an exception of type "Failure" and associates an error message to it. The message can be constructed at run-time. .
static Standard_EXPORT Handle_Standard_Failure | NewInstance (const Standard_CString aMessage)
| Used to construct an instance of the exception object as a handle. Shall be used to protect against possible construction of exception object in C stack -- that is dangerous since some of methods require that object was allocated dynamically. .
static Standard_EXPORT Handle_Standard_Failure | Caught ()
| Returns the last caught exception. Needed when exceptions are emulated by C longjumps, in other cases is also provided for compatibility. .

## Protected Member Functions

virtual Standard_EXPORT void | Throw () const
| Used only if standard C++ exceptions are used. Throws exception of the same type as this by C++ throw, and stores current object as last thrown exception, to be accessible by method Caught() .

## Private Attributes

Standard_CString | myMessage

## Constructor & Destructor Documentation

Standard_EXPORT Standard_Failure::Standard_Failure | ( |  | ) |

Standard_EXPORT Standard_Failure::Standard_Failure | ( | const Standard_Failure & | f | ) |

Standard_EXPORT Standard_Failure::Standard_Failure | ( | const Standard_CString | aString | ) |

Standard_Failure::~Standard_Failure | ( |  | ) | `[inline]`

## Member Function Documentation

static Standard_EXPORT Handle_Standard_Failure Standard_Failure::Caught | ( |  | ) | `[static]`

Standard_EXPORT void Standard_Failure::Destroy | ( |  | ) |

Standard_CString Standard_Failure::GetMessageString | ( |  | ) | const`[inline]`

Standard_EXPORT const Standard_Failure::Handle | ( | Standard_Type |  | ) | const

Reimplemented in Expr_ExprFailure, Expr_InvalidAssignment, Expr_InvalidFunction, Expr_InvalidOperand, Expr_NotAssigned, Expr_NotEvaluable, ExprIntrp_SyntaxError, gp_VectorWithNullMagnitude, math_NotSquare, math_SingularMatrix, OSD_Exception, OSD_Exception_ACCESS_VIOLATION, OSD_Exception_ARRAY_BOUNDS_EXCEEDED, OSD_Exception_CTRL_BREAK, OSD_Exception_FLT_DENORMAL_OPERAND, OSD_Exception_FLT_DIVIDE_BY_ZERO, OSD_Exception_FLT_INEXACT_RESULT, OSD_Exception_FLT_INVALID_OPERATION, OSD_Exception_FLT_OVERFLOW, OSD_Exception_FLT_STACK_CHECK, OSD_Exception_FLT_UNDERFLOW, OSD_Exception_ILLEGAL_INSTRUCTION, OSD_Exception_IN_PAGE_ERROR, OSD_Exception_INT_DIVIDE_BY_ZERO, OSD_Exception_INT_OVERFLOW, OSD_Exception_INVALID_DISPOSITION, OSD_Exception_NONCONTINUABLE_EXCEPTION, OSD_Exception_PRIV_INSTRUCTION, OSD_Exception_STACK_OVERFLOW, OSD_Exception_STATUS_NO_MEMORY, OSD_OSDError, OSD_SIGBUS, OSD_SIGHUP, OSD_SIGILL, OSD_SIGINT, OSD_SIGKILL, OSD_Signal, OSD_SIGQUIT, OSD_SIGSEGV, OSD_SIGSYS, Plugin_Failure, Quantity_ColorDefinitionError, Quantity_DateDefinitionError, Quantity_PeriodDefinitionError, Resource_NoSuchResource, Standard_AbortiveTransaction, Standard_ConstructionError, Standard_DimensionError, Standard_DimensionMismatch, Standard_DivideByZero, Standard_DomainError, Standard_ImmutableObject, Standard_LicenseError, Standard_LicenseNotFound, Standard_MultiplyDefined, Standard_NegativeValue, Standard_NoMoreObject, Standard_NoSuchObject, Standard_NotImplemented, Standard_NullObject, Standard_NullValue, Standard_NumericError, Standard_OutOfMemory, Standard_OutOfRange, Standard_Overflow, Standard_ProgramError, Standard_RangeError, Standard_TooManyUsers, Standard_TypeMismatch, Standard_TypeMismatch, Standard_Underflow, StdFail_InfiniteSolutions, StdFail_NotDone, StdFail_Undefined, StdFail_UndefinedDerivative, StdFail_UndefinedValue, Storage_StreamExtCharParityError, Storage_StreamFormatError, Storage_StreamModeError, Storage_StreamReadError, Storage_StreamTypeMismatchError, Storage_StreamUnknownTypeError, Storage_StreamWriteError, Units_NoSuchType, and Units_NoSuchUnit.

Standard_EXPORT void Standard_Failure::Jump | ( |  | ) | const

static Standard_EXPORT Handle_Standard_Failure Standard_Failure::NewInstance | ( | const Standard_CString | aMessage | ) | `[static]`

void Standard_Failure::operator<< | ( | Standard_OStream & | s | ) | const`[inline]`

Standard_EXPORT Standard_Failure& Standard_Failure::operator= | ( | const Standard_Failure & | f | ) |

Standard_EXPORT void Standard_Failure::Print | ( | Standard_OStream & | s | ) | const

static Standard_EXPORT void Standard_Failure::Raise | ( | Standard_SStream & | aReason | ) | `[static]`

Reimplemented in Expr_ExprFailure, Expr_InvalidAssignment, Expr_InvalidFunction, Expr_InvalidOperand, Expr_NotAssigned, Expr_NotEvaluable, ExprIntrp_SyntaxError, gp_VectorWithNullMagnitude, math_NotSquare, math_SingularMatrix, OSD_Exception, OSD_Exception_ACCESS_VIOLATION, OSD_Exception_ARRAY_BOUNDS_EXCEEDED, OSD_Exception_CTRL_BREAK, OSD_Exception_FLT_DENORMAL_OPERAND, OSD_Exception_FLT_DIVIDE_BY_ZERO, OSD_Exception_FLT_INEXACT_RESULT, OSD_Exception_FLT_INVALID_OPERATION, OSD_Exception_FLT_OVERFLOW, OSD_Exception_FLT_STACK_CHECK, OSD_Exception_FLT_UNDERFLOW, OSD_Exception_ILLEGAL_INSTRUCTION, OSD_Exception_IN_PAGE_ERROR, OSD_Exception_INT_DIVIDE_BY_ZERO, OSD_Exception_INT_OVERFLOW, OSD_Exception_INVALID_DISPOSITION, OSD_Exception_NONCONTINUABLE_EXCEPTION, OSD_Exception_PRIV_INSTRUCTION, OSD_Exception_STACK_OVERFLOW, OSD_Exception_STATUS_NO_MEMORY, OSD_OSDError, OSD_SIGBUS, OSD_SIGHUP, OSD_SIGILL, OSD_SIGINT, OSD_SIGKILL, OSD_Signal, OSD_SIGQUIT, OSD_SIGSEGV, OSD_SIGSYS, Plugin_Failure, Quantity_ColorDefinitionError, Quantity_DateDefinitionError, Quantity_PeriodDefinitionError, Resource_NoSuchResource, Standard_AbortiveTransaction, Standard_ConstructionError, Standard_DimensionError, Standard_DimensionMismatch, Standard_DivideByZero, Standard_DomainError, Standard_ImmutableObject, Standard_LicenseError, Standard_LicenseNotFound, Standard_MultiplyDefined, Standard_NegativeValue, Standard_NoMoreObject, Standard_NoSuchObject, Standard_NotImplemented, Standard_NullObject, Standard_NullValue, Standard_NumericError, Standard_OutOfMemory, Standard_OutOfRange, Standard_Overflow, Standard_ProgramError, Standard_RangeError, Standard_TooManyUsers, Standard_TypeMismatch, Standard_Underflow, StdFail_InfiniteSolutions, StdFail_NotDone, StdFail_Undefined, StdFail_UndefinedDerivative, StdFail_UndefinedValue, Storage_StreamExtCharParityError, Storage_StreamFormatError, Storage_StreamModeError, Storage_StreamReadError, Storage_StreamTypeMismatchError, Storage_StreamUnknownTypeError, Storage_StreamWriteError, Units_NoSuchType, and Units_NoSuchUnit.

static Standard_EXPORT void Standard_Failure::Raise | ( | const Standard_CString | aMessage = `""` | ) | `[static]`

Reimplemented in Expr_ExprFailure, Expr_InvalidAssignment, Expr_InvalidFunction, Expr_InvalidOperand, Expr_NotAssigned, Expr_NotEvaluable, ExprIntrp_SyntaxError, gp_VectorWithNullMagnitude, math_NotSquare, math_SingularMatrix, OSD_Exception, OSD_Exception_ACCESS_VIOLATION, OSD_Exception_ARRAY_BOUNDS_EXCEEDED, OSD_Exception_CTRL_BREAK, OSD_Exception_FLT_DENORMAL_OPERAND, OSD_Exception_FLT_DIVIDE_BY_ZERO, OSD_Exception_FLT_INEXACT_RESULT, OSD_Exception_FLT_INVALID_OPERATION, OSD_Exception_FLT_OVERFLOW, OSD_Exception_FLT_STACK_CHECK, OSD_Exception_FLT_UNDERFLOW, OSD_Exception_ILLEGAL_INSTRUCTION, OSD_Exception_IN_PAGE_ERROR, OSD_Exception_INT_DIVIDE_BY_ZERO, OSD_Exception_INT_OVERFLOW, OSD_Exception_INVALID_DISPOSITION, OSD_Exception_NONCONTINUABLE_EXCEPTION, OSD_Exception_PRIV_INSTRUCTION, OSD_Exception_STACK_OVERFLOW, OSD_Exception_STATUS_NO_MEMORY, OSD_OSDError, OSD_SIGBUS, OSD_SIGHUP, OSD_SIGILL, OSD_SIGINT, OSD_SIGKILL, OSD_Signal, OSD_SIGQUIT, OSD_SIGSEGV, OSD_SIGSYS, Plugin_Failure, Quantity_ColorDefinitionError, Quantity_DateDefinitionError, Quantity_PeriodDefinitionError, Resource_NoSuchResource, Standard_AbortiveTransaction, Standard_ConstructionError, Standard_DimensionError, Standard_DimensionMismatch, Standard_DivideByZero, Standard_DomainError, Standard_ImmutableObject, Standard_LicenseError, Standard_LicenseNotFound, Standard_MultiplyDefined, Standard_NegativeValue, Standard_NoMoreObject, Standard_NoSuchObject, Standard_NotImplemented, Standard_NullObject, Standard_NullValue, Standard_NumericError, Standard_OutOfMemory, Standard_OutOfRange, Standard_Overflow, Standard_ProgramError, Standard_RangeError, Standard_TooManyUsers, Standard_TypeMismatch, Standard_Underflow, StdFail_InfiniteSolutions, StdFail_NotDone, StdFail_Undefined, StdFail_UndefinedDerivative, StdFail_UndefinedValue, Storage_StreamExtCharParityError, Storage_StreamFormatError, Storage_StreamModeError, Storage_StreamReadError, Storage_StreamTypeMismatchError, Storage_StreamUnknownTypeError, Storage_StreamWriteError, Units_NoSuchType, and Units_NoSuchUnit.

Standard_EXPORT void Standard_Failure::Reraise | ( | const Standard_CString | aMessage | ) |

Standard_EXPORT void Standard_Failure::Reraise | ( |  | ) |

Standard_EXPORT void Standard_Failure::SetMessageString | ( | const Standard_CString | aMessage | ) |

virtual Standard_EXPORT void Standard_Failure::Throw | ( |  | ) | const`[protected, virtual]`

Reimplemented in Expr_ExprFailure, Expr_InvalidAssignment, Expr_InvalidFunction, Expr_InvalidOperand, Expr_NotAssigned, Expr_NotEvaluable, ExprIntrp_SyntaxError, gp_VectorWithNullMagnitude, math_NotSquare, math_SingularMatrix, OSD_Exception, OSD_Exception_ACCESS_VIOLATION, OSD_Exception_ARRAY_BOUNDS_EXCEEDED, OSD_Exception_CTRL_BREAK, OSD_Exception_FLT_DENORMAL_OPERAND, OSD_Exception_FLT_DIVIDE_BY_ZERO, OSD_Exception_FLT_INEXACT_RESULT, OSD_Exception_FLT_INVALID_OPERATION, OSD_Exception_FLT_OVERFLOW, OSD_Exception_FLT_STACK_CHECK, OSD_Exception_FLT_UNDERFLOW, OSD_Exception_ILLEGAL_INSTRUCTION, OSD_Exception_IN_PAGE_ERROR, OSD_Exception_INT_DIVIDE_BY_ZERO, OSD_Exception_INT_OVERFLOW, OSD_Exception_INVALID_DISPOSITION, OSD_Exception_NONCONTINUABLE_EXCEPTION, OSD_Exception_PRIV_INSTRUCTION, OSD_Exception_STACK_OVERFLOW, OSD_Exception_STATUS_NO_MEMORY, OSD_OSDError, OSD_SIGBUS, OSD_SIGHUP, OSD_SIGILL, OSD_SIGINT, OSD_SIGKILL, OSD_Signal, OSD_SIGQUIT, OSD_SIGSEGV, OSD_SIGSYS, Plugin_Failure, Quantity_ColorDefinitionError, Quantity_DateDefinitionError, Quantity_PeriodDefinitionError, Resource_NoSuchResource, Standard_AbortiveTransaction, Standard_ConstructionError, Standard_DimensionError, Standard_DimensionMismatch, Standard_DivideByZero, Standard_DomainError, Standard_ImmutableObject, Standard_LicenseError, Standard_LicenseNotFound, Standard_MultiplyDefined, Standard_NegativeValue, Standard_NoMoreObject, Standard_NoSuchObject, Standard_NotImplemented, Standard_NullObject, Standard_NullValue, Standard_NumericError, Standard_OutOfMemory, Standard_OutOfRange, Standard_Overflow, Standard_ProgramError, Standard_RangeError, Standard_TooManyUsers, Standard_TypeMismatch, Standard_Underflow, StdFail_InfiniteSolutions, StdFail_NotDone, StdFail_Undefined, StdFail_UndefinedDerivative, StdFail_UndefinedValue, Storage_StreamExtCharParityError, Storage_StreamFormatError, Storage_StreamModeError, Storage_StreamReadError, Storage_StreamTypeMismatchError, Storage_StreamUnknownTypeError, Storage_StreamWriteError, Units_NoSuchType, and Units_NoSuchUnit.

## Field Documentation

Standard_CString Standard_Failure::myMessage `[private]`

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

- Standard_Failure.hxx
- Standard_Failure.lxx