NSCL DDAS 12.2-009
Support for XIA DDAS at FRIB
CXIAException.h
Go to the documentation of this file.
1
6#ifndef CXIAEXCEPTION_H
7#define CXIAEXCEPTION_H
8
9#include <Exception.h>
10
11#include <string>
12
32const size_t kXIABUFSIZE = 1024;
33const size_t kREASONSIZE = 2048;
34
35class CXIAException : public CException {
36private:
37 int m_reasonCode;
38 std::string m_reason;
39
40public:
47 CXIAException(std::string msg, std::string fcn, int rv);
48
50 virtual ~CXIAException() {};
51
52 // Exception interface:
53
58 virtual int ReasonCode() const;
63 virtual const char *ReasonText() const;
64};
65
66#endif
const size_t kREASONSIZE
Reason text max buffer length.
Definition: CXIAException.h:33
const size_t kXIABUFSIZE
XIA API return code max buffer length.
Definition: CXIAException.h:32
CException wrapper for XIA return codes containing the return code and context message of the error.
Definition: CXIAException.h:35
virtual ~CXIAException()
Destructor. Nothing to do here.
Definition: CXIAException.h:50
CXIAException(std::string msg, std::string fcn, int rv)
Constructor from arguments.
Definition: CXIAException.cpp:18
virtual int ReasonCode() const
Get the reason code.
Definition: CXIAException.cpp:28
virtual const char * ReasonText() const
Get the return text.
Definition: CXIAException.cpp:30