Changeset 40:ec5dde8a6ff6 in xplra for src/client/c/hu/varadiistvan/xplra/Exception.cc
- Timestamp:
- 02/14/13 18:21:47 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/client/c/hu/varadiistvan/xplra/Exception.cc
r14 r40 61 61 //------------------------------------------------------------------------------ 62 62 63 ProtocolException::ProtocolException(errorCode_t errorCode) throw() : 64 errorCode(errorCode) 63 ProtocolException::ProtocolException(errorCode_t errorCode, bool hasParameter, 64 long parameter) throw() : 65 errorCode(errorCode), 66 hasParameter(parameter), 67 parameter(parameter) 65 68 { 66 69 switch (errorCode) { … … 70 73 case UNKNOWN_DATAREF: 71 74 message = "xplra::ProtocolException: unknown dataref"; 75 if (hasParameter) { 76 char buf[32]; 77 snprintf(buf, sizeof(buf), " (# %ld)", parameter); 78 message += buf; 79 } 72 80 break; 73 81 case INVALID_TYPE: … … 85 93 case INVALID_ID: 86 94 message = "xplra::ProtocolException: invalid ID"; 95 break; 96 case INVALID_DURATION: 97 message = "xplra::ProtocolException: invalid duration"; 87 98 break; 88 99 case OTHER:
Note:
See TracChangeset
for help on using the changeset viewer.