Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TStandardException
Inherited By:
TFPDivideByZeroException
TFPInexactException
TFPInvalidException
TFPOverflowException
TFPUnderflowException
Purpose:
TFPException is an abstract base class (derived from TStandardException) that encapsulates the common behavior of standard floating-point exception objects to be thrown for C++ exception handling. Each such object may contain meaningful current (recent history) IEEE floating-point exception flags which were set at the time it was thrown. Uncaught objects cause text descriptions of the underlying floating-point exception to be displayed via the TStandardException mechanism. This class is meant to be derived only by the five provided derived classes, corresponding to the five IEEE floating-point exception types: TFPInvalidException, TFPOverflowException, TFPUnderflowException, TFPDivideByZeroException, and TFPInexactException.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
The class TFPException MUST be derived. Its derived classes represent floating-point exception types. The five derived classes are:
class TFPInvalidException : public TFPException.
class TFPOverflowException : public TFPException.
class TFPUnderflowException : public TFPException.
class TFPDivideByZeroException : public TFPException.
class TFPInexactException : public TFPException.
These five derived classes are not intended to be derived further.
Concurrency:
Multithread safe.
Resource Use:
No special requirements.
Member Function: TFPException::operator<<=
virtual TStream & operator <<= (TStream & fromwhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromwhere -The stream the object is streamed in from.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TFPException::operator>>=
virtual TStream & operator >>=(TStream & towhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & towhere -The stream the object is streamed out to.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TFPException::GetCurrentExceptions
virtual TFPExceptionSet GetCurrentExceptions () const
Interface Category:
API.
Purpose:
Returns the exception set associated with the object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the exception set associated with the object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TFPException::SetCurrentExceptions
virtual void SetCurrentExceptions (const TFPExceptionSet &)
Interface Category:
API.
Purpose:
The argument becomes the exception set associated with the object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
- TFPException ()
- TFPException (const TFPExceptionSet &)
- TFPException (const TFPException &)
Interface Category:
API.
Purpose:
- Default constructor. Associates the empty exception set with the object.
- Associates its argument exception set with the object.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- This is the most commonly used constructor.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TFPExceptionSet & -The exception set to associate with the object.
- const TFPException & -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual ~ TFPException ()
Interface Category:
API.
Purpose:
Destructor. Does nothing.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TFPException::operator=
TFPException & operator =(const TFPException &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void Throw () const
Interface Category:
API.
Purpose:
Throws a TFPException object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.