Logo Search packages:      
Sourcecode: jaula version File versions

JAULA::Exception Class Reference
[JAULA: Error handling]

#include <jaula_exception.h>

Inheritance diagram for JAULA::Exception:

JAULA::Bad_Data_Type JAULA::Lexan_Error JAULA::Name_Duplicated JAULA::No_Error JAULA::Syntax_Error

List of all members.


Detailed Description

Base class for error handling exceptions.

This class is the base for all the exceptions thrown by the methods defined in this library.
Author:
Kombo Morongo <morongo666@gmail.com>

Definition at line 53 of file jaula_exception.h.


Public Types

enum  ExCode {
  NO_ERROR, BAD_DATA_TYPE, NAME_DUPLICATED, LEXAN_ERROR,
  SYNTAX_ERROR
}
 Enumeration of available error codes. More...

Public Member Functions

void addOrigin (std::string const &origin)
 Attachs a new origin after the existing ones.
void display (std::ostream &ostr) const
 Represents the instance in a stream.
 Exception (Exception const &orig)
 Copy constructor.
 Exception (ExCode code=NO_ERROR, std::string const &detail="", std::string const &action="", std::string const &origin="")
 Constructor.
std::string const & getAction (void) const
 Retrieves the action that caused the exception.
ExCode getCode (void) const
 Retrieves the error code for the exception.
virtual std::string const & getDetail (void) const
 Retrieves the detailed description for the exception.
std::string const & getOrigin (void) const
 Retrieves the method being run when the exception arose.
Exceptionoperator= (Exception const &orig)
 Assignment operator.
void setAction (std::string const &action)
 Establishes the action that caused the exception.
void setDetail (std::string const &detail)
 Establishes the description for the exception.
void setOrigin (std::string const &origin)
 Establishes the method being run when the exception arose.
virtual ~Exception ()
 Destructor.

Protected Member Functions

void setCode (ExCode code)
 Establishes the error code for the exception.

Private Attributes

std::string action_
 Container action causing the exception.
ExCode code_
 Container for error code.
std::string detail_
 Container for exception textual detail.
std::string origin_
 Container for where the exception was detected.

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

Generated by  Doxygen 1.6.0   Back to index