Ignore:
Timestamp:
02/14/13 18:21:47 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Implemented the client support for the new commands and updated the basic test programs with tests showing messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/client/c/hu/varadiistvan/xplra/Exception.cc

    r14 r40  
    6161//------------------------------------------------------------------------------
    6262
    63 ProtocolException::ProtocolException(errorCode_t errorCode) throw() :
    64     errorCode(errorCode)
     63ProtocolException::ProtocolException(errorCode_t errorCode, bool hasParameter,
     64                                     long parameter) throw() :
     65    errorCode(errorCode),
     66    hasParameter(parameter),
     67    parameter(parameter)
    6568{
    6669    switch (errorCode) {
     
    7073      case UNKNOWN_DATAREF:
    7174        message = "xplra::ProtocolException: unknown dataref";
     75        if (hasParameter) {
     76            char buf[32];
     77            snprintf(buf, sizeof(buf), " (# %ld)", parameter);
     78            message += buf;
     79        }
    7280        break;
    7381      case INVALID_TYPE:
     
    8593      case INVALID_ID:
    8694        message = "xplra::ProtocolException: invalid ID";
     95        break;
     96      case INVALID_DURATION:
     97        message = "xplra::ProtocolException: invalid duration";
    8798        break;
    8899      case OTHER:
Note: See TracChangeset for help on using the changeset viewer.