PBoRiError.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_error_PBoRiError_h_
#define polybori_error_PBoRiError_h_
// load PolyBoRi settings
#include <polybori/pbori_defs.h>
#include <exception>
BEGIN_NAMESPACE_PBORI
class PBoRiError:
public std::exception, public CTypes {
public:
typedef CTypes::errornum_type errornum_type;
typedef CTypes::errortext_type errortext_type;
typedef PBoRiError self;
PBoRiError(errornum_type err = CTypes::alright);
PBoRiError(const self&);
~PBoRiError() throw();
errornum_type code() const;
errortext_type text() const;
const char* what() const throw() { return text(); }
protected:
errornum_type error;
};
END_NAMESPACE_PBORI
#endif // of #ifndef PBoRiError_h_
polybori::CAuxTypes::errortext_type
const char * errortext_type
Type used to verbose error information.
Definition: pbori_defs.h:243
END_NAMESPACE_PBORI
#define END_NAMESPACE_PBORI
Finish project's namespace.
Definition: pbori_defs.h:77
BEGIN_NAMESPACE_PBORI
#define BEGIN_NAMESPACE_PBORI
Start project's namespace.
Definition: pbori_defs.h:74
pbori_defs.h
polybori::PBoRiError
This class is used for polybori's exception handling.
Definition: PBoRiError.h:31
polybori::PBoRiError::errornum_type
CTypes::errornum_type errornum_type
adopt global error code enumeration
Definition: PBoRiError.h:36
polybori::PBoRiError::error
errornum_type error
Definition: PBoRiError.h:63
polybori::CTypes
This struct contains type definitions to be used in library classes.
Definition: pbori_defs.h:269
polybori::PBoRiError::errortext_type
CTypes::errortext_type errortext_type
adopt global error text type
Definition: PBoRiError.h:39