Sequence::SeqException Class Reference

Base class for exceptions that may be thrown. More...

#include <Sequence/SeqExceptions.hpp>

Inheritance diagram for Sequence::SeqException:
Sequence::badFormat

List of all members.

Public Member Functions

 SeqException (void)
 SeqException (const char *x)
std::ostream & print (std::ostream &out)
std::ostream & print (std::ostream &out) const
const char * error (void) const

Detailed Description

Base class for exceptions that may be thrown.

All exceptions thrown by routines defined in namespace Sequence are derived from a common base class, Sequence::SeqException. This class contains a private member, message, which is a C-style string. message is use to store and report error messages when exceptions need to be thrown. The member function SeqException::print takes a reference to an ostream as an argument, an can be used to display message. The output operator<< can also be used on objects of this type. Alternately, if you need to display the message in some other fashion, the public member function SeqException::error will return message to you as a const char *

Examples:

gestimator.cc.

Definition at line 52 of file SeqExceptions.hpp.


Constructor & Destructor Documentation

Sequence::SeqException::SeqException ( void   ) 

Default constructor--will generate a default error message, which is not likely to be meaningful

Note:
this constructor only exists for the purpose of inheriting from this class

Definition at line 29 of file SeqExceptions.cc.

Sequence::SeqException::SeqException ( const char *  x  )  [explicit]

Throw the exception with error message x

Definition at line 37 of file SeqExceptions.cc.


Member Function Documentation

const char * Sequence::SeqException::error ( void   )  const

Return the error message if you want to use it in some other fashion then printing it to an std::ostream

Definition at line 60 of file SeqExceptions.cc.

std::ostream & Sequence::SeqException::print ( std::ostream &  out  )  const

Write the error to out.

Definition at line 52 of file SeqExceptions.cc.

std::ostream & Sequence::SeqException::print ( std::ostream &  out  ) 

Write the error to out.

Examples:
gestimator.cc.

Definition at line 44 of file SeqExceptions.cc.


The documentation for this class was generated from the following files:
Generated on Thu Aug 11 13:22:03 2011 for libsequence by  doxygen 1.6.3