OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Exception handling classes

Exception handling classes provide various functions that help you write error-free ObjectWindows applications. More...

Classes

class  owl::TXInvalidMainWindow
 A nested class, TXInvalidMainWindow describes an exception that results from an invalid Window. More...
 
class  owl::TXClipboard
 TXClipboard creates the TXClipboard exception with a string resource. More...
 
class  owl::TXBase
 Derived from xmsg, TXBase is the base class for ObjectWindows and ObjectComponents exception-handling classes. More...
 
class  owl::TXOwl
 TXOwl is root class of the ObjectWindows exception hierarchy. More...
 
class  owl::TXOutOfMemory
 Describes an exception that results from running out of memory. More...
 
class  owl::TXNotSupportedCall
 
class  owl::TXEndSession
 TXEndSession is thrown from TWindow's handler for WM_ENDSESSION. More...
 
class  owl::TXGdi
 Describes an exception resulting from GDI failures such as creating too many TWindow device contexts (DCs). More...
 

Functions

 owl::TXOwl::TXOwl (const tstring &msg, uint resId=0)
 An OWL exception with a given message for displaying and an unsigned Id that can be used for identification or loading a string.
 
 owl::TXOwl::TXOwl (uint resId, TModule *module=&GetGlobalModule())
 An OWL exception with a given unsigned Id that can is used for loading a message string & identification.
 
virtual owl::TXOwl::~TXOwl ()
 Destroys a TXOwl object.
 
TXOwlowl::TXOwl::Clone ()
 
void owl::TXOwl::Throw ()
 Throws the exception object.
 
virtual int owl::TXOwl::Unhandled (TModule *appModule, uint promptResId)
 Per-exception class unhandled-handler, will default to the per-module unhandled-handler.
 
uint owl::TXOwl::GetErrorCode () const
 Returns the resource ID.
 
static tstring owl::TXOwl::ResourceIdToString (bool *found, uint resId, TModule *module=&GetGlobalModule())
 Static member function used to convert a resource id to a 'string'.
 
static tstring owl::TXOwl::MakeMessage (uint resId, const tstring &infoStr, TModule *module=&GetGlobalModule())
 
static tstring owl::TXOwl::MakeMessage (uint resId, LPCTSTR infoStr, TModule *module=&GetGlobalModule())
 Extension to string loader adds the feature of sprintf'ing an additional information string into the resource message string.
 
static tstring owl::TXOwl::MakeMessage (uint resId, uint infoNum, TModule *module=&GetGlobalModule())
 This extension to the string loader adds the feature of sprintf'ing an additional information string into the resource message string.
 
static void owl::TXOwl::Raise (const tstring &msg, uint resId=0)
 
static void owl::TXOwl::Raise (uint resId, TModule *module=&GetGlobalModule())
 
 owl::TXOutOfMemory::TXOutOfMemory ()
 Constructs a TXOutOfMemory object.
 
TXOutOfMemoryowl::TXOutOfMemory::Clone ()
 
void owl::TXOutOfMemory::Throw ()
 Throws the exception object.
 
static void owl::TXOutOfMemory::Raise ()
 Construct a TXOutOfMemory exception from scratch, and throw it.
 
 owl::TXNotSupportedCall::TXNotSupportedCall ()
 
TXNotSupportedCallowl::TXNotSupportedCall::Clone ()
 
void owl::TXNotSupportedCall::Throw ()
 
static void owl::TXNotSupportedCall::Raise ()
 
 owl::TXEndSession::TXEndSession ()
 

Variables

uint owl::TXOwl::ResId
 Resource ID for a TXOwl object.
 

Detailed Description

Exception handling classes provide various functions that help you write error-free ObjectWindows applications.

TXBase is the base class for all ObjectWindows and ObjectComponents classes. Derived from the TXBase class, TXOwl is the base class for the following ObjectWindows exception classes:

Function Documentation

◆ TXEndSession()

owl::TXEndSession::TXEndSession ( )
inline

Definition at line 113 of file except.h.

◆ TXNotSupportedCall()

owl::TXNotSupportedCall::TXNotSupportedCall ( )

Definition at line 308 of file except.cpp.

◆ TXOutOfMemory()

owl::TXOutOfMemory::TXOutOfMemory ( )

Constructs a TXOutOfMemory object.

Definition at line 275 of file except.cpp.

◆ TXOwl() [1/2]

owl::TXOwl::TXOwl ( const tstring & msg,
uint resId = 0 )

An OWL exception with a given message for displaying and an unsigned Id that can be used for identification or loading a string.

Definition at line 128 of file except.cpp.

◆ TXOwl() [2/2]

owl::TXOwl::TXOwl ( uint resId,
TModule * module = &GetGlobalModule() )

An OWL exception with a given unsigned Id that can is used for loading a message string & identification.

Loads the string resource identified by the resId parameter and uses this resId to initialize the TXBase object.

Definition at line 142 of file except.cpp.

◆ ~TXOwl()

owl::TXOwl::~TXOwl ( )
virtual

Destroys a TXOwl object.

Definition at line 152 of file except.cpp.

◆ Clone() [1/3]

TXOwl * owl::TXOwl::Clone ( )
virtual

Reimplemented from owl::TXBase.

Reimplemented in owl::TXPrinter, owl::TXShell, owl::TXTheme, owl::TXValidator, and owl::TXWindow.

Definition at line 166 of file except.cpp.

References owl::TXOwl::TXOwl().

◆ Clone() [2/3]

TXOutOfMemory * owl::TXOutOfMemory::Clone ( )
virtual

Reimplemented from owl::TXBase.

Definition at line 282 of file except.cpp.

References owl::TXOutOfMemory::TXOutOfMemory().

◆ Clone() [3/3]

TXNotSupportedCall * owl::TXNotSupportedCall::Clone ( )
virtual

Reimplemented from owl::TXBase.

Definition at line 315 of file except.cpp.

References owl::TXNotSupportedCall::TXNotSupportedCall().

◆ GetErrorCode()

uint owl::TXOwl::GetErrorCode ( ) const
inline

Returns the resource ID.

Definition at line 123 of file except.h.

References owl::TXOwl::ResId.

◆ MakeMessage() [1/3]

tstring owl::TXOwl::MakeMessage ( uint resId,
const tstring & infoStr,
TModule * module = &GetGlobalModule() )
static

Definition at line 242 of file except.cpp.

References owl::TXOwl::MakeMessage().

◆ MakeMessage() [2/3]

tstring owl::TXOwl::MakeMessage ( uint resId,
LPCTSTR infoStr,
TModule * module = &GetGlobalModule() )
static

Extension to string loader adds the feature of sprintf'ing an additional information string into the resource message string.

Definition at line 233 of file except.cpp.

References _stprintf, and owl::TXOwl::ResourceIdToString().

◆ MakeMessage() [3/3]

tstring owl::TXOwl::MakeMessage ( uint resId,
uint infoNum,
TModule * module = &GetGlobalModule() )
static

This extension to the string loader adds the feature of sprintf'ing an additional information string into the resource message string.

Definition at line 252 of file except.cpp.

References _stprintf, and owl::TXOwl::ResourceIdToString().

◆ Raise() [1/4]

void owl::TXOutOfMemory::Raise ( )
static

Construct a TXOutOfMemory exception from scratch, and throw it.

Definition at line 301 of file except.cpp.

References owl::TXOutOfMemory::TXOutOfMemory().

◆ Raise() [2/4]

void owl::TXNotSupportedCall::Raise ( )
static

Definition at line 326 of file except.cpp.

References owl::TXOutOfMemory::Throw().

◆ Raise() [3/4]

void owl::TXOwl::Raise ( const tstring & msg,
uint resId = 0 )
static

Definition at line 186 of file except.cpp.

References owl::TXOwl::TXOwl().

◆ Raise() [4/4]

void owl::TXOwl::Raise ( uint resId,
TModule * module = &GetGlobalModule() )
static

Definition at line 195 of file except.cpp.

References owl::TXOwl::TXOwl().

◆ ResourceIdToString()

tstring owl::TXOwl::ResourceIdToString ( bool * found,
uint resId,
TModule * module = &GetGlobalModule() )
static

Static member function used to convert a resource id to a 'string'.

This is necessary since we must pass a string to the xmsg base class constructor. Sets found to true if the resource was located, otherwise false. In either case, the string is initialized to something printable. If the string message cannot be loaded, returns a "not found" message.

Definition at line 209 of file except.cpp.

References _stprintf, and _T.

◆ Throw() [1/3]

void owl::TXOwl::Throw ( )
virtual

Throws the exception object.

Throw must be implemented in any class derived from TXOwl.

Reimplemented from owl::TXBase.

Reimplemented in owl::TXPrinter, owl::TXPrinting, owl::TXShell, owl::TXTheme, owl::TXValidator, and owl::TXWindow.

Definition at line 176 of file except.cpp.

◆ Throw() [2/3]

void owl::TXOutOfMemory::Throw ( )
virtual

Throws the exception object.

Throw must be implemented in any class derived from TXOwl.

Reimplemented from owl::TXBase.

Definition at line 292 of file except.cpp.

◆ Throw() [3/3]

void owl::TXNotSupportedCall::Throw ( )
virtual

Reimplemented from owl::TXBase.

Definition at line 321 of file except.cpp.

◆ Unhandled()

int owl::TXOwl::Unhandled ( TModule * appModule,
uint promptResId )
virtual

Per-exception class unhandled-handler, will default to the per-module unhandled-handler.

Called when an unhandled exception is caught at the main message loop level.

Reimplemented in owl::TXWindow.

Definition at line 160 of file except.cpp.

Variable Documentation

◆ ResId

uint owl::TXOwl::ResId

Resource ID for a TXOwl object.

Definition at line 70 of file except.h.