Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
TStandardExceptionFormatter
Purpose:
TExceptionFormatter is an abstract base class used to derive classes that format error messages from message templates. An error message template is selected from a supplied archive of message templates, based on the C++ type of the exception and the exception's enum value.
Instantiation:
TExceptionFormatter is an abstract base class and should not be instantiated.
Deriving Classes:
Classes can be derived from TExceptionFormatter to create formatter classes for custom message formats. Deriving classes should override the Format member function.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TExceptionFormatter ()
- TExceptionFormatter (const TExceptionFormatter & other)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called to create a TExceptionFormatter object suitable for streaming into.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TExceptionFormatter ()
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:
Not multithread safe.
Other Considerations:
None.
static TExceptionFormatter * CreateFormatter (const TAllocationHeap & heap, const TStandardException & exception, const TLocale & locale)
Interface Category:
API.
Purpose:
Creates an exception formatter on the specified heap for the specified exception.
Calling Context:
Called by TStandardExceptionFormatter to create the formatter for the specified exception.
Parameters:
- const TAllocationHeap & heap -The heap on which to create the exception formatter object.
- const TStandardException & exception -The exception for which the formatter is to be created.
- const TLocale & locale -Used as a key to look up localized presentation or names in the archive.
Return Value:
A pointer to the formatter that was created.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
static void GetFormattedText (const TStandardException & exception, const TLocale & currentLocale, TText & textMessage)
Interface Category:
API.
Purpose:
Fills in the parameter textMessage with the error message for the specified exception.
Calling Context:
Called to obtain the error message associated with the specified exception.
Parameters:
- const TStandardException & exception -The exception whose error message is to be returned.
- const TLocale & currentLocale -Used as a key to look up localized presentation or names in the archive.
- TText & textMessage -The area to be filled in with the exception's error message.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void Format (const TStandardException & exception, TArchive * Archive, const TLocale & Locale, TText & Message)
Interface Category:
API.
Purpose:
Formats an error message for the specified exception, using the message archive provided. The parameter Message is filled in with the resulting message. Deriving classes must override this member function.
Calling Context:
Called to format an error message for the specified exception.
Parameters:
- const TStandardException & exception -The exception whose error message is to be formatted.
- TArchive * Archive -The archive of error message templates to be used.
- const TLocale & Locale -Used as a key to look up localized presentation or names in the archive.
- TText & Message -Used to hold the message that is formatted.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Deriving classes must override this member function.
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 streams itself 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:
Not multithread safe.
Other Considerations:
None.
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 streams itself 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:
Not multithread safe.
Other Considerations:
None.
TExceptionFormatter & operator =(const TExceptionFormatter & 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:
Not 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.