// -------------------------------------------------------------------
  void extractFromByteArray(LogicalByteArray buf, String addr, InterfaceConnection ic)
      throws CharacterCodingException, UnsupportedCharsetException, SQLException {
    exception_nr = buf.extractInt();
    exception_detail = buf.extractInt();

    String temp0 = Integer.toString(exception_nr);
    String temp1 = Integer.toString(exception_detail);

    switch (exception_nr) {
      case TRANSPORT.CEE_SUCCESS:
        break;
      case odbc_SQLSvc_Close_SQLError_exn_:
        SQLError = new ERROR_DESC_LIST_def();
        SQLError.extractFromByteArray(buf, ic);
        break;
      case odbc_SQLSvc_Close_ParamError_exn_:
        ParamError = ic.decodeBytes(buf.extractString(), 1);
        ;
        throw TrafT4Messages.createSQLException(
            null, ic.getLocale(), "ids_program_error", ParamError, addr);
      case odbc_SQLSvc_Close_InvalidConnection_exn_:
        throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null);
      case odbc_SQLSvc_Close_TransactionError_exn_:
        throw TrafT4Messages.createSQLException(
            null, ic.getLocale(), "ids_transaction_error", temp1, addr);
      default:
        throw TrafT4Messages.createSQLException(
            null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1);
    }
  }