示例#1
0
  public int getLogStatus() throws JposException {
    // Make sure control is opened
    if (!bOpen) {
      throw new JposException(JPOS_E_CLOSED, "Control not opened");
    }

    // Make sure service supports at least version 1.9.0
    if (serviceVersion < deviceVersion19) {
      throw new JposException(JPOS_E_NOSERVICE, "Device Service is not 1.9.0 compliant.");
    }

    // Perform the operation
    try {
      return service19.getLogStatus();
    } catch (JposException je) {
      throw je;
    } catch (Exception e) {
      throw new JposException(JPOS_E_FAILURE, "Unhandled exception from Device Service", e);
    }
  }