Impact Acquire SDK C++
ExceptionFactory Class Reference

A factory class to raise Impact Acquire related exceptions. More...

#include <mvIMPACT_acquire.h>

Static Public Member Functions

static std::string getLastErrorString (void)
 Returns the last error string that did occur inside the framework within the current thread.
 
static void raiseException (const char *pFunctionName, int lineNumber, int errorCode, HOBJ objectHandle=INVALID_ID)
 Raises an exception from an error code, its origin in terms of the function name and the line number the error did occur and an optional component handle.
 
static void raiseException (const char *pFunctionName, int lineNumber, TDMR_ERROR errorCode, const std::string &msg)
 Raises an exception from an error code, its origin in terms of the function name and the line number the error did occur and an exception string.
 

Detailed Description

A factory class to raise Impact Acquire related exceptions.

This class contains a collection of static member functions that are used inside the interface to raise the appropriate exception in case of an error

Member Function Documentation

◆ getLastErrorString()

static std::string getLastErrorString ( void )
inlinestatic

Returns the last error string that did occur inside the framework within the current thread.

Returns
The last error string that did occur inside the framework within the current thread.

◆ raiseException() [1/2]

void raiseException ( const char * pFunctionName,
int lineNumber,
int errorCode,
HOBJ objectHandle = INVALID_ID )
inlinestatic

Raises an exception from an error code, its origin in terms of the function name and the line number the error did occur and an optional component handle.

Parameters
[in]pFunctionNameThe name of the function this exception was raised from.
[in]lineNumberThe line number in the source this exception was raised from.
[in]errorCodeThe error code.
[in]objectHandleA handle to an object.

◆ raiseException() [2/2]

static void raiseException ( const char * pFunctionName,
int lineNumber,
TDMR_ERROR errorCode,
const std::string & msg )
inlinestatic

Raises an exception from an error code, its origin in terms of the function name and the line number the error did occur and an exception string.

Parameters
[in]pFunctionNameThe name of the function this exception was raised from.
[in]lineNumberThe line number in the source this exception was raised from.
[in]errorCodeThe error code.
[in]msgThe actual exception text.