⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trace.java

📁 hsqldb是100%java实现的数据库,是一个开放源代码的JAVA数据库 l 具有标准的SQL语法和JAVA接口 l HSQLDB可以自由使用和分发 l 非常简洁和快速的
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
    NOT_USED_161                            = 161,    NOT_USED_162                            = 162,    ORDER_LIMIT_REQUIRED                    = 163,    TRIGGER_ALREADY_EXISTS                  = 164,    ASSERT_DIRECT_EXEC_WITH_PARAM           = 165,    NOT_USED_166                            = 166,    Expression_compareValues                = 167,    INVALID_LIMIT_EXPRESSION                = 168,    INVALID_TOP_EXPRESSION                  = 169,    SQL_CONSTRAINT_REQUIRED                 = 170,    TableWorks_dropConstraint               = 171,    TEXT_TABLE_SOURCE_FILENAME              = 172,    TEXT_TABLE_SOURCE_VALUE_MISSING         = 173,    TEXT_TABLE_SOURCE_SEPARATOR             = 174,    UNSUPPORTED_PARAM_CLASS                 = 175,    JDBC_NULL_STREAM                        = 176,    INTEGRITY_CONSTRAINT_VIOLATION_NOPARENT = 177,    NOT_USED_178                            = 178,    NOT_USED_179                            = 179,    QuotedTextDatabaseRowInput_getField     = 180,    QuotedTextDatabaseRowInput_getField2    = 181,    TextDatabaseRowInput_getField           = 182,    TextDatabaseRowInput_getField2          = 183,    TextDatabaseRowInput_getField3          = 184,    Parser_ambiguous_between1               = 185,    SEQUENCE_REFERENCED_BY_VIEW             = 186,    NOT_USED_187                            = 187,    TextCache_openning_file_error           = 188,    TextCache_closing_file_error            = 189,    TextCache_purging_file_error            = 190,    SEQUENCE_NOT_FOUND                      = 191,    SEQUENCE_ALREADY_EXISTS                 = 192,    TABLE_REFERENCED_CONSTRAINT             = 193,    TABLE_REFERENCED_VIEW                   = 194,    NOT_USED_195                            = 195,    TEXT_SOURCE_EXISTS                      = 196,    COLUMN_IS_REFERENCED                    = 197,    FUNCTION_CALL_ERROR                     = 198,    TRIGGERED_DATA_CHANGE                   = 199,    INVALID_FUNCTION_ARGUMENT               = 200,    UNSUPPORTED_INTERNAL_OPERATION          = 201,    NOT_USED_202                            = 202,    INVALID_PREPARED_STATEMENT              = 203,    CREATE_TRIGGER_COMMAND_1                = 204,    TRIGGER_FUNCTION_CLASS_NOT_FOUND        = 205,    NOT_USED_206                            = 206,    NOT_USED_207                            = 207,    INVALID_COLLATION_NAME_NO_SUBCLASS      = 208,    DataFileCache_makeRow                   = 209,    DataFileCache_open                      = 210,    DataFileCache_close                     = 211,    Expression_resolveTypes1                = 212,    Expression_resolveTypes2                = 213,    Expression_resolveTypes3                = 214,    Expression_resolveTypes4                = 215,    UNRESOLVED_PARAMETER_TYPE               = 216,    Expression_resolveTypes6                = 217,    Expression_resolveTypes7                = 218,    Expression_resolveTypeForLike           = 219,    NOT_USED_220                            = 220,    Expression_resolveTypeForIn2            = 221,    Session_execute                         = 222,    NOT_USED_223                            = 223,    NOT_USED_224                            = 224,    DATA_FILE_IS_FULL                       = 225,    THREE_PART_IDENTIFIER                   = 226,    INVALID_SCHEMA_NAME_NO_SUBCLASS         = 227,    DEPENDENT_DATABASE_OBJECT_EXISTS        = 228,    NO_SUCH_ROLE_GRANT                      = 229,    NO_SUCH_ROLE_REVOKE                     = 230,    NONMOD_ACCOUNT                          = 231,    NO_SUCH_GRANTEE                         = 232,    MISSING_SYSAUTH                         = 233,    MISSING_GRANTEE                         = 234,    CHANGE_GRANTEE                          = 235,    NULL_NAME                               = 236,    ILLEGAL_ROLE_NAME                       = 237,    ROLE_ALREADY_EXISTS                     = 238,    NO_SUCH_ROLE                            = 239,    MISSING_ROLEMANAGER                     = 240,    GRANTEE_ALREADY_EXISTS                  = 241,    MISSING_PUBLIC_GRANTEE                  = 242,    NONMOD_GRANTEE                          = 243,    CIRCULAR_GRANT                          = 244,    ALREADY_HAVE_ROLE                       = 245,    DONT_HAVE_ROLE                          = 246,    NOT_USED_247                            = 247,    RETRIEVE_NEST_ROLE_FAIL                 = 248,    NO_SUCH_RIGHT                           = 249,    IN_SCHEMA_DEFINITION                    = 250,    PRIMARY_KEY_NOT_ALLOWED                 = 251,    COLUMN_IS_IN_CONSTRAINT                 = 252,    COLUMN_SIZE_REQUIRED                    = 253,    INVALID_SIZE_PRECISION                  = 254,    LAST_ERROR_HANDLE                       = 255;    //    static String MESSAGE_TAG = "$$";    //    /** Used during tests. */    static {        try {            TRACE = TRACE || Boolean.getBoolean("hsqldb.trace");            TRACESYSTEMOUT = TRACESYSTEMOUT                             || Boolean.getBoolean("hsqldb.tracesystemout");        } catch (Exception e) {}        if (!"LAST".equals(BundleHandler.getString(bundleHandle,                String.valueOf(LAST_ERROR_HANDLE)))) {            throw new RuntimeException();        }    }    /**     * 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>     */    public static HsqlException error(int code, int subCode,                                      final Object[] add) {        // in case of negative code        code = Math.abs(code);        String mainErrorMessage = getMessage(code);        String state            = "S1000";        if (mainErrorMessage.length() >= 5) {            state            = mainErrorMessage.substring(0, 5);            mainErrorMessage = mainErrorMessage.substring(6);        }        if (subCode != 0) {            mainErrorMessage += getMessage(Math.abs(subCode));        }        StringBuffer sb = new StringBuffer(mainErrorMessage.length() + 32);        int          lastIndex = 0;        int          escIndex  = mainErrorMessage.length();        if (add != null) {            // removed test: i < add.length            // because if mainErrorMessage is equal to "blabla $$"            // then the statement escIndex = mainErrorMessage.length();            // is never reached!  ???            for (int i = 0; i < add.length; i++) {                escIndex = mainErrorMessage.indexOf(MESSAGE_TAG, lastIndex);                if (escIndex == -1) {                    break;                }                sb.append(mainErrorMessage.substring(lastIndex, escIndex));                sb.append(add[i] == null ? "null exception message"                                         : add[i].toString());                lastIndex = escIndex + MESSAGE_TAG.length();            }        }        escIndex = mainErrorMessage.length();        sb.append(mainErrorMessage.substring(lastIndex, escIndex));        return new HsqlException(sb.toString(), state, -code);    }    /**     * 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   add     optional parameters     *     * @return an <code>HsqlException</code>     */    public static HsqlException error(int code, final Object[] add) {        return error(code, 0, add);    }    public static HsqlException error(int code, int code2, String add) {        return error(code, getMessage(code2) + ' ' + add);    }    public static HsqlException error(int code, int code2) {        return error(code, getMessage(code2));    }    /**     * Method declaration     *     *     * @param code     * @param add     *     * @return     */    public static HsqlException error(int code, Object add) {// fredt@users 20020221 - patch 513005 by sqlbob@users (RMP)        code = Math.abs(code);        String s = getMessage(code);        if (add != null) {            s += ": " + add.toString();        }// fredt@users 20020221 - patch 513005 by sqlbob@users (RMP)        return new HsqlException(s.substring(6), s.substring(0, 5), -code);        //return getError(s);    }    /**     *     Return a new <code>HsqlException</code> according to the result parameter.     *     * @param result    the <code>Result</code> associated with the exception     *     @return a new <code>HsqlException</code> according to the result parameter     */    public static HsqlException error(final Result result) {        return new HsqlException(result);    }    /**     * Return a new <code>Result</code> of type error.     *     * @param result    the <code>Result</code> associated with the exception     *     @return a new <code>HsqlException</code> according to the result parameter     */// fredt@users 20020221 - patch 513005 by sqlbob@users (RMP)    /**     *  Constructor for errors     *     * @param  e exception     */    static Result toResult(HsqlException e) {        return new Result(e.getMessage(), e.getSQLState(), e.getErrorCode());    }    public static RuntimeException runtimeError(int code, Object add) {        HsqlException e = error(code, add);        return new RuntimeException(e.getMessage());    }    /**     * Returns the error message given the error code.<br/>     * Note: this method must be used when throwing exception other     * than <code>HsqlException</code>.     *     * @param errorCode    the error code associated to the error message     * @return  the error message associated with the error code     * @see #sDescription     */    public static String getMessage(final int errorCode) {        return getMessage(errorCode, false, null);    }    /**     * Returns the error message given the error code.<br/>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -