shark::Exception Class Reference

Top-level exception class of the shark library. More...

#include <shark/Core/Exception.h>

+ Inheritance diagram for shark::Exception:

Public Member Functions

 Exception (const std::string &what=std::string(), const std::string &file=std::string(), unsigned int line=0)
 Default c'tor. More...
 
 ~Exception () throw ()
 Default d'tor. More...
 
const char * what () const throw ()
 Accesses the description of the exception. More...
 
const std::string & file () const
 Accesses the name of the file the exception occurred in. More...
 
unsigned int line () const
 Accesses the line of the file the exception occured in. More...
 

Protected Attributes

std::string m_what
 Description of the exception. More...
 
std::string m_file
 File name the exception occurred in. More...
 
unsigned int m_line
 Line of file the exception occurred in. More...
 

Detailed Description

Top-level exception class of the shark library.

Definition at line 43 of file Exception.h.

Constructor & Destructor Documentation

§ Exception()

shark::Exception::Exception ( const std::string &  what = std::string(),
const std::string &  file = std::string(),
unsigned int  line = 0 
)
inline

Default c'tor.

Parameters
[in]whatString that describes the exception.
[in]fileFilename the function that has thrown the exception resides in.
[in]lineLine of file that has thrown the exception.

Definition at line 51 of file Exception.h.

§ ~Exception()

shark::Exception::~Exception ( )
throw (
)
inline

Default d'tor.

Definition at line 59 of file Exception.h.

Member Function Documentation

§ file()

const std::string& shark::Exception::file ( ) const
inline

Accesses the name of the file the exception occurred in.

Definition at line 71 of file Exception.h.

References m_file.

§ line()

unsigned int shark::Exception::line ( ) const
inline

Accesses the line of the file the exception occured in.

Definition at line 78 of file Exception.h.

References m_line.

§ what()

const char* shark::Exception::what ( ) const
throw (
)
inline

Accesses the description of the exception.

Definition at line 64 of file Exception.h.

References m_what.

Referenced by main().

Member Data Documentation

§ m_file

std::string shark::Exception::m_file
protected

File name the exception occurred in.

Definition at line 84 of file Exception.h.

Referenced by file().

§ m_line

unsigned int shark::Exception::m_line
protected

Line of file the exception occurred in.

Definition at line 85 of file Exception.h.

Referenced by line().

§ m_what

std::string shark::Exception::m_what
protected

Description of the exception.

Definition at line 83 of file Exception.h.

Referenced by what().


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