Java SQLException isXJ015Error(Throwable exception)

Here you can find the source of isXJ015Error(Throwable exception)

Description

is XJ Error

License

Open Source License

Declaration

private static boolean isXJ015Error(Throwable exception) 

Method Source Code

//package com.java2s;
/*/*from w  ww.java 2 s  .co  m*/
 * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 * The software in this package is published under the terms of the CPAL v1.0
 * license, a copy of which has been included with this distribution in the
 * LICENSE.txt file.
 */

import java.sql.SQLException;

public class Main {
    private static boolean isXJ015Error(Throwable exception) {
        while (exception != null) {
            if (exception instanceof SQLException
                    && "XJ015".equals(((SQLException) exception)
                            .getSQLState())) {
                return true;
            }
            exception = exception != exception.getCause() ? exception
                    .getCause() : null;
        }
        return false;
    }
}

Related

  1. isInvalidParameterException(SQLException se)
  2. isPSQLUniqueViolation(SQLException ex)
  3. isReadOnlyException(SQLException e)
  4. isRecoverableException(SQLException e)
  5. isTransient(SQLException e)
  6. log(Logger logger, SQLException e)
  7. log(SQLException e, Logger log)
  8. logAll(Log log, SQLException e)
  9. logSqlError(SQLException ex, Logger logger)