Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

rutz::error Class Reference

#include <rutz/error.h>

Inheritance diagram for rutz::error:

Inheritance graph
[legend]
Collaboration diagram for rutz::error:

Collaboration graph
[legend]
List of all members.

Detailed Description

rutz::error is a basic exception class.

It carries a string message describing the error as well as information about the location in the source code in which the exception was generated.

Definition at line 55 of file error.h.

Public Member Functions

 error (const rutz::file_pos &pos)
 Default construct with an empty message string.
 error (const rutz::fstring &msg, const rutz::file_pos &pos)
 Construct with an error message.
 error (const error &other) throw ()
 Copy constructor.
virtual ~error () throw ()
 Virtual destructor.
virtual const char * what () const throw ()
 Get the decorated error message as a C-style string.
const rutz::file_possrc_pos () const throw ()
 Get the source file position where the error was generated.
const rutz::backtraceget_backtrace () const throw ()
 Get the stack back trace associated with this exception.

Static Public Member Functions

static void get_last_backtrace (rutz::backtrace &dst)
 Copy out the back trace most recently used in constructing a rutz::error.

Protected Member Functions

void set_msg (const rutz::fstring &new_msg) throw ()
 Reset the error message.
const rutz::fstringget_msg () const throw ()
 Get the (un-decorated) error message.


Constructor & Destructor Documentation

rutz::error::error const rutz::file_pos pos  ) 
 

Default construct with an empty message string.

Definition at line 59 of file error.cc.

References dbg_dump, GVX_DBG_REGISTER::g_last_backtrace, GVX_DBG_REGISTER::g_last_backtrace_mutex, GVX_DBG_LEVEL, GVX_MUTEX_LOCK, GVX_TRACE, and rutz::backtrace::print().

rutz::error::error const rutz::fstring msg,
const rutz::file_pos pos
 

Construct with an error message.

Definition at line 85 of file error.cc.

References dbg_dump, GVX_DBG_REGISTER::g_last_backtrace, GVX_DBG_REGISTER::g_last_backtrace_mutex, GVX_DBG_LEVEL, GVX_MUTEX_LOCK, GVX_TRACE, and rutz::backtrace::print().

rutz::error::error const error other  )  throw ()
 

Copy constructor.

Definition at line 112 of file error.cc.

References dbg_dump, GVX_TRACE, and m_msg.

rutz::error::~error  )  throw () [virtual]
 

Virtual destructor.

Definition at line 128 of file error.cc.

References GVX_TRACE.


Member Function Documentation

const rutz::backtrace& rutz::error::get_backtrace  )  const throw () [inline]
 

Get the stack back trace associated with this exception.

Definition at line 77 of file error.h.

void rutz::error::get_last_backtrace rutz::backtrace dst  )  [static]
 

Copy out the back trace most recently used in constructing a rutz::error.

Definition at line 165 of file error.cc.

References GVX_DBG_REGISTER::g_last_backtrace, GVX_DBG_REGISTER::g_last_backtrace_mutex, and GVX_MUTEX_LOCK.

Referenced by backTrace(), and tcl::event_loop_impl::run().

const rutz::fstring& rutz::error::get_msg  )  const throw () [inline, protected]
 

Get the (un-decorated) error message.

Definition at line 87 of file error.h.

void rutz::error::set_msg const rutz::fstring new_msg  )  throw () [inline, protected]
 

Reset the error message.

Definition at line 84 of file error.h.

const rutz::file_pos& rutz::error::src_pos  )  const throw () [inline]
 

Get the source file position where the error was generated.

Definition at line 74 of file error.h.

const char * rutz::error::what  )  const throw () [virtual]
 

Get the decorated error message as a C-style string.

Definition at line 134 of file error.cc.

References buf, rutz::fstring::c_str(), rutz::fstring::length(), log10(), rutz::file_pos::m_file_name, rutz::file_pos::m_line_no, and snprintf().


The documentation for this class was generated from the following files:
Generated on Mon Nov 23 15:57:24 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4