Vaca::Exception Class Reference

#include <Exception.h>

Inheritance diagram for Vaca::Exception:

Vaca::CreateConditionVariableException Vaca::CreateThreadException Vaca::CreateWidgetException Vaca::HttpRequestException Vaca::ParseException Vaca::RegisterException Vaca::ResourceException

List of all members.


Detailed Description

Exception generated from Vaca.

Base class for every exception generated by Vaca objects.

Public Member Functions

 Exception ()
 Creates generic exception with an empty error message.
 Exception (const String &message)
 Creates an exception with the specified error message.
virtual ~Exception () throw ()
 Destroys the exception.
virtual const char * what () const throw ()
 Returns a printable C-string of the error.
virtual const StringgetMessage () const throw ()
 Returns the error message specified in the creation of the exception.
void show ()
 Shows the error in a MsgBox.

Private Attributes

String m_message
DWORD m_errorCode
LPSTR m_msgbuf


Constructor & Destructor Documentation

Vaca::Exception::Exception (  )  [inline]

Creates generic exception with an empty error message.

Vaca::Exception::Exception ( const String message  )  [inline]

Creates an exception with the specified error message.

Parameters:
message Error message.

virtual Vaca::Exception::~Exception (  )  throw () [inline, virtual]

Destroys the exception.


Member Function Documentation

virtual const char* Vaca::Exception::what (  )  const throw () [inline, virtual]

Returns a printable C-string of the error.

If the Exception(const String&) constructor was used to create the exception, this method returns the same string as getMessage but in ASCII format.

virtual const String& Vaca::Exception::getMessage (  )  const throw () [inline, virtual]

Returns the error message specified in the creation of the exception.

See also:
Exception(const String&)

void Vaca::Exception::show (  )  [inline]

Shows the error in a MsgBox.

Warning:
The MsgBox doesn't lock any Frame. It's like a dialog running in background.
Win32 Specific:
It is like call MessageBox(NULL, getMessage(), ...);


Member Data Documentation

LPSTR Vaca::Exception::m_msgbuf [private]