Package org.hsqldb

Examples of org.hsqldb.HsqlException


    private static final int    SQL_CODE_DIGITS  = 4;
    private static final int    ERROR_CODE_BASE  = 11;

    public static RuntimeException runtimeError(int code, String add) {

        HsqlException e = error(code, add);

        return new RuntimeException(e.getMessage());
    }
View Full Code Here


        if (add != null) {
            s += ": " + add.toString();
        }

        return new HsqlException(t, s.substring(SQL_STATE_DIGITS + 1),
                                 s.substring(0, SQL_STATE_DIGITS), -code);
    }
View Full Code Here

        if (lineNumber > 1) {
            add = getMessage(ErrorCode.M_parse_line);
            s   = s + " :" + add + String.valueOf(lineNumber);
        }

        return new HsqlException(null, s.substring(SQL_STATE_DIGITS + 1),
                                 s.substring(0, SQL_STATE_DIGITS), -code);
    }
View Full Code Here

    public static HsqlException error(int code, Throwable t) {

        String message = getMessage(code, 0, null);

        return new HsqlException(t, message.substring(0, SQL_STATE_DIGITS),
                                 -code);
    }
View Full Code Here

        String message = getMessage(code, subCode, add);
        int    sqlCode = subCode < ERROR_CODE_BASE ? code
                                                   : subCode;

        return new HsqlException(t, message.substring(SQL_STATE_DIGITS + 1),
                                 message.substring(0, SQL_STATE_DIGITS),
                                 -sqlCode);
    }
View Full Code Here

        }

        int sqlCode = subCode < ERROR_CODE_BASE ? code
                                                : subCode;

        return new HsqlException(null,
                                 message.substring(SQL_STATE_DIGITS + 1),
                                 message.substring(0, SQL_STATE_DIGITS),
                                 -sqlCode);
    }
View Full Code Here

     * For SIGNAL and RESIGNAL
     * @see HsqlException#HsqlException(Throwable,String, String, int)
     * @return an <code>HsqlException</code>
     */
    public static HsqlException error(String message, String sqlState, int i) {
        return new HsqlException(null, message, sqlState, i);
    }
View Full Code Here

        return BundleHandler.getString(bundleHandle, key);
    }

    public static HsqlException error(final Result result) {
        return new HsqlException(result);
    }
View Full Code Here

    boolean insertIndexNodes(Index primaryIndex, Index newIndex) {

        int           position = newIndex.getPosition();
        RowIterator   it       = primaryIndex.firstRow(this);
        int           rowCount = 0;
        HsqlException error    = null;

        try {
            while (it.hasNext()) {
                Row row = it.getNextRow();
View Full Code Here

                if (cs != null
                        && cs.getType() == StatementTypes.CREATE_ROUTINE) {
                    continue;
                }

                HsqlException e =
                    Error.error(result.getException(),
                                ErrorCode.ERROR_IN_SCRIPT_FILE,
                                ErrorCode.M_DatabaseScriptReader_read,
                                new Object[] {database.getCanonicalPath(),
                    new Integer(lineCount), result.getMainString()
View Full Code Here

TOP

Related Classes of org.hsqldb.HsqlException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.