UDT Reference: CUDTException Methods |
The getErrorMessage method gives the text description of the exception.
char* getErrorMessage( |
NONE.
Text string describing the exception or error.
No exception will be caused.
The getErrorMessage method is used to provide simple description of the exception or error. To provide information to the program, getErrorNo should be used.
This example code shows how to detect exception and output the error information:
CUDT udt;
try { //do some UDT operations, e.g., udt.send(data, len); } catch (CUDTException e) { cout << "error happens: " << e.getErrorMessage() << endl;
// process exceptions catch (...) { cout << "unknown error happens, program exit." << endl; return; } |