code: public static HsqlException error(int code, int subCode,
                                        final Object[] add) {
  
          String message = getMessage(code, subCode, add);
          int    sqlCode = subCode < ERROR_CODE_BASE ? code
                                                     : subCode;
  
          return new HsqlException(message.substring(SQL_STATE_DIGITS + 1),
                                   message.substring(0, SQL_STATE_DIGITS),
                                   -sqlCode);
      }
docs: Compose error message by inserting the strings in the add parameters
  in placeholders within the error message. The message string contains
  $$ markers for each context variable. Context variables are supplied in
  the add parameters.
  
  @param code      main error code
  @param subCode   sub error code (if 0 => no subMessage!)
  @param   add     optional parameters
  
  @return an <code>HsqlException</code>