Class Index Cross Index Namespace Index

Class LdasException

LDAS Exception Class
Contained in: global
Derived from: none
Derived by: FormatException StreamException

#include "general/ldasexception.hh"


public function member index:

LdasException();
explicit LdasException(int library, int code, const std::string& msg, const std::string& info = "", const char* file = 0, size_t line = 0);
LdasException(const ErrorInfo& e);
LdasException(const LdasException& e);
virtual ~LdasException();
void addError(int library, int code, const std::string& msg, const std::string& info = "", const char* file = 0, size_t line = 0);
void addError(const ErrorInfo& e);
const ErrorInfo& getError(size_t i) const;
inline size_t getSize() const; Get Size
inline bool operator !=(const LdasException& e) const; Not-Equal Comparison
LdasException& operator =(const LdasException& e);
inline bool operator ==(const LdasException& e) const; Equal Comparison
const ErrorInfo& operator [](size_t i) const;
 

Description:

This class defines the types of exceptions thrown by the LDAS libraries. The class stores multiple instances of ErrorInfo objects, allowing an exception to be tracked as it is thrown and re-thrown in the code. This class carries a lot of information with it, so it should only be used to report errors. Throwing this class should not be a normal part of the program flow. Due to the overhead, this class is probably not very good for reporting memory allocation errors.


Function Member Descriptions:


LdasException::LdasException


LdasException();



LdasException::LdasException


explicit LdasException(int library, int code, const std::string& msg, const std::string& info = "", const char* file = 0, size_t line = 0);



LdasException::LdasException


LdasException(const ErrorInfo& e);



LdasException::LdasException


LdasException(const LdasException& e);



LdasException::~LdasException


virtual ~LdasException();



LdasException::addError


void addError(int library, int code, const std::string& msg, const std::string& info = "", const char* file = 0, size_t line = 0);



LdasException::addError


void addError(const ErrorInfo& e);



LdasException::getError


const ErrorInfo& getError(size_t i) const;



LdasException::getSize - Get Size


inline size_t getSize() const;
Return the number of ErrorInfo objects contained in this object.

Return value:
size_t


LdasException::operator != - Not-Equal Comparison


inline bool operator !=(const LdasException& e) const;

Parameters:
ParameterDescription
const LdasException& e

Return value:
bool


LdasException::operator =


LdasException& operator =(const LdasException& e);



LdasException::operator == - Equal Comparison


inline bool operator ==(const LdasException& e) const;

Parameters:
ParameterDescription
const LdasException& e

Return value:
bool


LdasException::operator []


const ErrorInfo& operator [](size_t i) const;



Variable Member Descriptions:


LdasException::mErrors -

std::vector< ErrorInfo > mErrors;