omgui::Exception Class Reference

#include <omgui/exception.h>

Inherited by omgui::SystemError.

List of all members.


Detailed Description

Base class for all exceptions thrown by omgui

Public Types

enum  error_codes {
  SYSTEM = 1, WIDGET_NO_PARENT, NATIVE_HANDLE, GUI_INIT_FAILED,
  PANEL_NO_LAYOUT_MANAGER, EXISTING_OBJECT_ID
}

Public Member Functions

 Exception (int code, int line, const char *file, int extra=0) throw ()
int get_code () const throw ()
int get_extra () const throw ()
const char * get_file () const throw ()
int get_line () const throw ()
virtual const char * what () const throw ()
virtual ~Exception () throw ()

Protected Attributes

int m_code
 A value used to indicate the error code.
int m_extra
 Provides additional error information, such as the system error code.
const char * m_file
 the name of the file that generated the exception
int m_line
 line that generated the exception

Member Enumeration Documentation

Enumerator:
SYSTEM  A system call failed unexpectedly.
WIDGET_NO_PARENT  An attempt was made to create a widget with no parent, but the widget requires one.
NATIVE_HANDLE  An error was encountered creating the native widget.
GUI_INIT_FAILED  An error was encountered initializing the GUI.
PANEL_NO_LAYOUT_MANAGER  A panel was created without a layout manager.
EXISTING_OBJECT_ID  A widget was created with an object_id that isn't unique.


Constructor & Destructor Documentation

omgui::Exception::Exception ( int  code,
int  line,
const char *  file,
int  extra = 0 
) throw ()

omgui::Exception::~Exception (  )  throw () [virtual]


Member Function Documentation

int omgui::Exception::get_code (  )  const throw ()

Returns:
The error code

int omgui::Exception::get_extra (  )  const throw ()

Returns:
Additional error code, such as the system error code

const char * omgui::Exception::get_file (  )  const throw ()

Returns:
An ansi description of the file throwing the exception

int omgui::Exception::get_line (  )  const throw ()

Returns:
The line of code throwing the exception

const char * omgui::Exception::what (  )  const throw () [virtual]

Returns:
An english ansi description of the error
Todo:
Once we figure out unicode, a localized version should also be provided


Member Data Documentation

int omgui::Exception::m_code [protected]

A value used to indicate the error code.

int omgui::Exception::m_extra [protected]

Provides additional error information, such as the system error code.

const char* omgui::Exception::m_file [protected]

the name of the file that generated the exception

int omgui::Exception::m_line [protected]

line that generated the exception


doxygen SourceForge.net Logo