#include <cterror.h>
Public Member Functions | |
CTError (const string &where, unsigned char code, unsigned char subcode1, unsigned char subcode2, const string &info="", const string &explanation="") | |
CTError (const string &where, const CTError &err) | |
CTError () | |
~CTError () | |
bool | isOk (unsigned char ad1=0, unsigned char ad2=0) |
const string & | where () const |
int | code () const |
int | subcode1 () const |
int | subcode2 () const |
const string & | info () const |
const string & | explanation () const |
string | errorString () |
const string & | reportedFrom () const |
You can use this one to return an error code or you can throw an object of this class. This class holds information about errors, like
|
Use this constructor if an error occurred.
|
|
|
|
Use this constructor if NO error occurred. This way you can return more complex return values. The caller may ask this object with isOk() to determine if an error occurred.
|
|
|
|
Returns the error code
|
|
Returns a short error string containing all important information.
|
|
Returns a short explanation of tis error.
|
|
Returns additional info about the error.
|
|
Tells you if this object shows an error or if all was ok. You may give additional values for subcode1 and subcode2 which are to be treated "OK". This is needed, when checking the result of CTCard::closeCard(), which sometimes returns SW1=0x62, thus showing that no card is inserted. Well, this is an error on all other methods, but when calling closeCard() this result is desired. So for checking the result of closeCard() use this: err.isOk(0x62);
|
|
Returns the path of methods/functions which reported this error. |
|
Returns subcode1
|
|
Returns subcode2
|
|
Return the location of the error, e.g. "CTError::CTError()".
|