Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
TAdobeIllustratorConverterException
TException
TGIFConverterException
TCcrmException
TAnonymousServiceException
TArgumentDictionaryLookupFailureException
TAssertionFailureException
TAttributeException
TAudioException
TCanonicalNumberException
TClockException
TCollectionException
TDisplayConfigurationRangeException
TDisplayException
TFPException
TFileSystemException
TForeignDataException
TFormatterException
TGlobalExceptionKludge
TGraphicsException
TInputMethodCantUseGUIElementException
TInvalidDataMember
TInvalidParameter
TInvalidStreamData
TInvalidUseOfNILPointer
TInvalidValue
TLicenseException
TLineLayoutException
TLocaleException
TMIDIException
TMessageStreamException
TNamedServiceException
TNotImplemented
TNullAnonymousReferenceException
TObjectPassedToSelf
TPersistentStorageException
TPrimeException
TPrintingException
TRandomException
TRemoteCallException
TShutdownException
TStreamException
TSystemWindowException
TTaligentTimeSourceSharedHeapExhausted
TTelephonyException
TTextException
TTimeMediaException
TTokenException
TTranscodingException
TTypeMismatch
TTypingConfigurationException
TTypingStoreChangedException
TUnicodeException
TUnknownVersion
TVideoException
TViewAdoptionRefusedException
TViewException
TViewHandleException
TArchiveException
TAttemptToUseDanglingSurrogate
TCaucusException
TCollaborationException
TCompoundDocumentException
TDNSHostNameException
TDisplayHardwareException
TDocumentException
TGUIDocumentException
TInvalidAddressToDelete
TInvalidVersionError
TMasterHeapListCorrupted
TMemoryHeapException
TMultipleRootLocatorException
TObjectDirectoryException
TPixelStreamReaderException
TPixelStreamWriterException
TProducerConsumerQueueClosed
TRecordException
TRecordSourceException
TReentrantMonitorException
TRequestIgnoredException
TRequestQueueClosedException
TSQLException
TServiceDefinitionException
TServiceReferenceException
TSharedObjectHeapExhausted
TTextEditException
TTransformException
TWindowException
Purpose:
TStandardException is an abstract class used to derive classes that represent errors. Classes derived from TStandardException are used when an error must be propagated into the Document or Application framework for standard handling that can include displaying a message to the user.
TStandardException is a low-level class that can safely be used in primitive parts of the system, assuming that the specific derived classes of TStandardException do not have additional dependencies.
TExceptionMessageFormatter is a related class that is used for getting an error text for a TStandardException.
Instantiation:
TStandardException is an abstract class and cannot be instantiated. Concrete classes derived from TStandardException can be allocated on the heap or the stack.
Deriving Classes:
Classes derived from TStandardException are used to represent specific error conditions.
Abstract classes derived from TStandardException should provide a protected GetReason member function that returns an unsigned long containing an enum value.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
virtual void Throw () const
Interface Category:
API.
Purpose:
Throws this exception object. This throw differs from a standard C++ throw in that the object thrown is a clone of the argument object. The standard C++ throw converts the object back to a TStandardException, thereby losing the specific error information embodied by the derived class.
Calling Context:
Called to throw this exception.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
All classes derived from TStandardException must override Throw like this:
TMySubClass::Throw() const { throw *(TMySubClass*)this;}
virtual void ThrowAndDelete ()
Interface Category:
API.
Purpose:
Throws and deletes this exception object. This object must be allocated on the heap, and is cloned to a temporary location when thrown and then deleted. The throw itself differs from a standard C++ throw in that the object thrown is a clone of the argument object. The standard C++ throw converts the object back to a TStandardException, thereby losing the specific error information embodied by the derived class.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
The default implementation uses your override of TStandardException::Throw both to do the actual throw and to make the copy of the original object.
virtual TStream & operator >>=(TStream & toStream) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toStream -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.
virtual TStream & operator <<= (TStream & fromStream)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromStream -The stream the object streams itself in from.
Return Value:
Returns a reference to the stream from which the object streams itself.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TStandardException & operator =(const TStandardException & other)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Call this protected member function only from the assignment operators of derived classes.
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.
Member Function: TStandardException::GetDescriptionIndex
virtual int GetDescriptionIndex () const
Interface Category:
API.
Purpose:
Returns this object's enum value, which was set by the constructor. The result returned is typically used by the base class to map an exception index to descriptive text in a platform-specific manner. Overridden by classes derived from TStandardException.
Calling Context:
Typically called by TStandardException.
Parameters:
Return Value:
Returns the error selector that was set by the constructor.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
unsigned long GetReason () const
Interface Category:
API.
Purpose:
Returns the enum value associated with this TStandardException.
Concrete classes derived from TStandardException should provide a public override of GetReason that returns the enum value as the actual enum type. This is intended to allow client code to catch a specific type and then to test for specific enum values. This implementation is intended for use by concrete derived classes in their implementation of GetReason.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the enum value associated with this TStandardException.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool operator ==(const TStandardException & other) const
Interface Category:
API.
Purpose:
Compares two objects for equality.
Calling Context:
Called to test the equivalence of two exception objects.
Parameters:
Return Value:
Returns true if the two exception objects are of the same type and their enum values are equal.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool operator != (const TStandardException & other) const
Interface Category:
API.
Purpose:
Compares two objects for inequality.
Calling Context:
Called to test the equivalence of two exception objects.
Parameters:
Return Value:
Returns true if the two exception objects are of different types or if their enum values are not equal.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- TStandardException ()
- TStandardException (unsigned long reason)
- TStandardException (const TStandardException & other)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a TStandardException with the specified reason code.
- Copy constructor.
Calling Context:
- Called to create a TStandardException object.
- Called to create a TStandardException with the specified reason code.
- Called to copy an object.
Parameters:
- Takes no parameters.
- unsigned long reason -The reason code to use for this exception.
- const TStandardException & other -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TStandardException ()
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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.