120 virtual const char*
what()
const throw();
132 QError(
QError_ err,
const std::string& file,
const int line,
const std::string& descr);
150 void SetDescription(
const std::string& file,
const int line,
const std::string& descr);
159 const std::string&
ToString()
const;
177 void Set(
QError_ e,
const std::string& file,
const int line,
const std::string &descr =
"");
194 static std::map<QError_, std::string>
fMap;
std::ostream & operator<<(std::ostream &s, const QError &err)
error stream of string error and description
QError_
underlying enum with error types
@ QERR_SHMEM_INVALID_INDEX
@ QERR_ELE_PULSER_STATUS_WRITE
@ QERR_ELE_PULSER_ATT_READ
@ QERR_ELE_BACKPLANE_WRITE
@ QERR_NET_CONNECTION_FAILED
@ QERR_ELE_BACKPLANE_READ
@ QERR_ELE_PULSER_STATUS_READ
@ QERR_UNDEFINED_INTERFACE
@ QERR_ELE_UNDEFINED_REGISTER
@ QERR_ELE_NO_ACKNOLDGEMENT
@ QERR_ELE_PULSER_ATT_WRITE
@ QERR_UNDEFINED_PARAMETER
@ QERR_DB_MAXLINES_EXCEEDED
error class with error type and description
bool operator!=(const QError_ &e) const
comparison with QError_ enum
QError_ GetCode() const
get error code
virtual const char * what() const
returns the same information as operator<<
bool operator==(const QError_ &e) const
comparison with QError_ enum
virtual ~QError()
destructor
void SetDescription(const std::string &descr)
set error description
void Set(QError_ e=QERR_SUCCESS, const std::string &descr="")
set to error code and description (default is SUCCESS)
const QError & operator=(const QError_ &e)
assignement operator
static void Init()
initialization of fMap
static std::map< QError_, std::string > fMap
map of string error
QError()
Default constructor.
std::string fDescr
error description
friend std::ostream & operator<<(std::ostream &s, const QError &err)
stream of error type and description
const std::string & GetDescription() const
get error description
QError_ fErr
underlying enum
const std::string & ToString() const
error type to string conversion