CXI
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Exception Class Reference

Constructs an exception object. More...

Public Member Functions

 Exception (const Exception &exc)
 
 Exception (const char *where, int err)
 
 Exception (const char *where, int line, int err)
 
 Exception (const char *where, const char *err_str)
 
 Exception (const char *where, int line, const char *err_str)
 
 Exception (const char *where, int line, int err, const char *err_str)
 
Exceptionoperator= (const Exception &exc)
 
virtual ~Exception (void)
 

Public Attributes

int err
 error code
 
char * err_str
 plain text error message
 
char * where
 name of function where error occurs
 
int line
 line number in source code
 

Detailed Description

Constructs an exception object.

The following example illustrates the usage of the Exception class:

try
{
throw("className::methodName", 0x80001234);
}
catch (Exception &ex)
{
printf("%sat %s\n", ex.err_str, ex.where);
}
Constructs an exception object.
Definition: sw/cxi_api_c/def/exception.h:22
char * where
name of function where error occurs
Definition: sw/cxi_api_c/def/exception.h:26
char * err_str
plain text error message
Definition: sw/cxi_api_c/def/exception.h:25

Constructor & Destructor Documentation

◆ Exception() [1/6]

Exception ( const Exception exc)

Copy constructor

◆ Exception() [2/6]

Exception ( const char *  where,
int  err 
)

Creates exception from given error code.

Parameters
wherename of function or method where error occurs
errerror code

Note:

  • If the error occurred on the CryptoServer, err_str contains a clear text error message.

◆ Exception() [3/6]

Exception ( const char *  where,
int  line,
int  err 
)

Creates exception from given error code.

Parameters
wherename of function or method where error occurs
lineline number in source code
errerror code

Note:

  • If the error occurred on the CryptoServer, err_str contains a clear text error message.

◆ Exception() [4/6]

Exception ( const char *  where,
const char *  err_str 
)

Creates exception with the given error message.

Parameters
wherename of function or method where error occurs
err_strerror message

◆ Exception() [5/6]

Exception ( const char *  where,
int  line,
const char *  err_str 
)

Creates exception with the given error message.

Parameters
wherename of function or method where error occurs
lineline number in source code
err_strerror message

◆ Exception() [6/6]

Exception ( const char *  where,
int  line,
int  err,
const char *  err_str 
)

Creates exception from given error code and error string.

Parameters
wherename of function or method where error occurs
lineline number in source code
errerror code
err_strerror message

Note:

  • If the error occurred on the CryptoServer, err_str contains a clear text error message.

◆ ~Exception()

~Exception ( void  )
virtual

Destructor

Member Function Documentation

◆ operator=()

Exception & operator= ( const Exception exc)

Assignment operator