sptk2 logo
SPTK Home Page

sptk::CException Class Reference
[Utility Classes]

SPTK generic exception class. More...

#include <CException.h>

Inheritance diagram for sptk::CException:

sptk::CDatabaseException sptk::CSystemException sptk::CTimeoutException

List of all members.

Public Member Functions

 CException (std::string text, std::string file="", int line=0, std::string description="")
virtual ~CException () throw ()
 Destructor.
virtual const char * what () const throw ()
 Returns complete text of exception.
std::string message () const
 Returns exception message without file name, line number, or description.
std::string file () const
 Returns exception file name.
int line () const
 Returns exception line number.
std::string description () const
 Returns exception description.


Detailed Description

SPTK generic exception class.

Contains information about what happened and where. It's based on std::exception, so if you just want to catch STL and SPTK exceptions - you can use try {} catch (std::exception& e) {} block.


Constructor & Destructor Documentation

sptk::CException::CException ( std::string  text,
std::string  file = "",
int  line = 0,
std::string  description = "" 
)

Constructor

Parameters:
text std::string, the exception text
file std::string, the file where exception occurs
line int, the line number in the file where exception occurs
description std::string, the optional description information


The documentation for this class was generated from the following file:

Mon Mar 5 11:55:57 2012: SPTK 3.5.7