Class: TRandomException

Declaration: RandomNumber.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TStandardException

Inherited By:

None.

Purpose:

Exception class, derived from TStandardException, representing exceptions arising in random number classes.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive from this class.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TRandomException::TRandomException

  1. TRandomException (EReason error)
  2. TRandomException ()
  3. TRandomException (const TRandomException & other)

Interface Category:

API.

Purpose:

  1. This constructor associates a reason with the exception object.
  2. Default constructor. The value of EReason is uninitialized.
  3. Copy constructor.

Calling Context:

  1. Called when the reason for an exception is known.
  2. Called by the stream-in operators and if an unknown exception is created.
  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: TRandomException::operator=

TRandomException & operator =(const TRandomException & other)

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: TRandomException::~TRandomException

virtual ~ TRandomException ()

Interface Category:

API.

Purpose:

Destructor.

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: TRandomException::GetReason

EReason GetReason () const

Interface Category:

API.

Purpose:

Returns the value of EReason that was set by the constructor. The result can be used to map to exception description text.

Calling Context:

GetReason is an override of the TStandardException member function. It is called to determine the reason for the exception.

Parameters:

Return Value:

Returns the value of EReason associated with the object. The result can be used to map to exception description text.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRandomException::Throw

virtual void Throw () const

Interface Category:

API.

Purpose:

Throws a TRandomException object.

Calling Context:

Called to throw a TRandomException object.

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.