S3FC project page S3FC home page

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

s3_exception Class Reference

All exceptions are derived from this class, inherited from std::exception. More...

#include <s3_exception.h>

Inheritance diagram for s3_exception:

Inheritance graph
[legend]
List of all members.

Public Methods

 s3_exception (const s3_exception &src)
 Instantiate a copy of an exception. More...

 ~s3_exception () throw ()
 Default destructor. More...

virtual const char * what () const throw ()
 Report error string. More...


Protected Methods

 s3_exception (const std::string &str)
 Initialising constructor. More...


Protected Attributes

std::string err_string
 String reported by what(). More...


Detailed Description

All exceptions are derived from this class, inherited from std::exception.

The more useful exceptions are s3_generic_exception and s3_index_exception. s3_exception can be used as follows.

if (!ok)
{
  throw s3_expection("It happens!");
}
It can then be caught with:
try
{
...
}
catch(const s3_exception& e)
{
   cout << e.what();
{

Definition at line 63 of file s3_exception.h.


Constructor & Destructor Documentation

s3_exception::s3_exception const std::string &    str [protected]
 

Initialising constructor.

Instantiate exception with supplied error string.

Definition at line 39 of file s3_exception.cc.

s3_exception::s3_exception const s3_exception &    src
 

Instantiate a copy of an exception.

Parameters:
src  Exception to copy.

Definition at line 45 of file s3_exception.cc.

References err_string.

s3_exception::~s3_exception   throw () [inline]
 

Default destructor.

Definition at line 84 of file s3_exception.h.


Member Function Documentation

const char * s3_exception::what   const throw () [virtual]
 

Report error string.

Definition at line 51 of file s3_exception.cc.

Referenced by s3_rpc_exception::s3_rpc_exception.


Member Data Documentation

std::string s3_exception::err_string [protected]
 

String reported by what().

Definition at line 69 of file s3_exception.h.

Referenced by s3_exception, s3_generic_exception::s3_generic_exception, s3_index_exception::s3_index_exception, and s3_rpc_exception::s3_rpc_exception.


The documentation for this class was generated from the following files:
Send comments to: s3fc@stonethree.com SourceForge Logo