NSCL DDAS 12.2-009
Support for XIA DDAS at FRIB
Public Member Functions | List of all members
CXIAException Class Reference

CException wrapper for XIA return codes containing the return code and context message of the error. More...

#include <CXIAException.h>

Inheritance diagram for CXIAException:
Inheritance graph
[legend]
Collaboration diagram for CXIAException:
Collaboration graph
[legend]

Public Member Functions

 CXIAException (std::string msg, std::string fcn, int rv)
 Constructor from arguments. More...
 
virtual ~CXIAException ()
 Destructor. Nothing to do here. More...
 
virtual int ReasonCode () const
 Get the reason code. More...
 
virtual const char * ReasonText () const
 Get the return text. More...
 

Detailed Description

CException wrapper for XIA return codes containing the return code and context message of the error.

XIA API major version 4 and later implement a return code and context message for non-zero return values from API functions. This class provides a wrapper for that business using the CException class:

Constructor & Destructor Documentation

◆ CXIAException()

CXIAException::CXIAException ( std::string  msg,
std::string  fcn,
int  rv 
)

Constructor from arguments.

Parameters
msgUser context message for the error.
fcnXIA API function name.
rvXIA API function return value.

Get the XIA API error message from the passed return value and construct the full error message.

◆ ~CXIAException()

virtual CXIAException::~CXIAException ( )
inlinevirtual

Destructor. Nothing to do here.

Member Function Documentation

◆ ReasonCode()

int CXIAException::ReasonCode ( ) const
virtual

Get the reason code.

Returns
The reason code: non-zero return value from the XIA API.

◆ ReasonText()

const char * CXIAException::ReasonText ( ) const
virtual

Get the return text.

Returns
Full context message describing the error.

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