Class: TFPException

Declaration: FPEnvironment.h

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:

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:

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.

Member Function: TFPException::TFPException

  1. TFPException ()
  2. TFPException (const TFPExceptionSet &)
  3. TFPException (const TFPException &)

Interface Category:

API.

Purpose:

  1. Default constructor. Associates the empty exception set with the object.
  2. Associates its argument exception set with the object.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. This is the most commonly used constructor.
  3. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TFPException::~TFPException

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.

Member Function: TFPException::Throw

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.