org.midao.jdbc.core.exception
Class BaseExceptionHandler

java.lang.Object
  extended by org.midao.jdbc.core.exception.BaseExceptionHandler
All Implemented Interfaces:
ExceptionHandler

public class BaseExceptionHandler
extends java.lang.Object
implements ExceptionHandler

Base ExceptionHandler implementation


Constructor Summary
BaseExceptionHandler(java.lang.String dbName)
          Creates new BaseExceptionHandler instance.
 
Method Summary
 MidaoSQLException convert(java.sql.Connection conn, java.sql.SQLException cause, java.lang.String sql, java.lang.Object... params)
          Converts SQLException into MidaoSQLException while populating it with query parameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseExceptionHandler

public BaseExceptionHandler(java.lang.String dbName)
Creates new BaseExceptionHandler instance.

Parameters:
dbName - Database name
Method Detail

convert

public MidaoSQLException convert(java.sql.Connection conn,
                                 java.sql.SQLException cause,
                                 java.lang.String sql,
                                 java.lang.Object... params)
Converts SQLException into MidaoSQLException while populating it with query parameters

Specified by:
convert in interface ExceptionHandler
Parameters:
conn - SQL Connection which is used in current session. Is not guaranteed to be open
cause - original SQL Exception
sql - SQL string which was executed
params - parameters which were supplied to the query
Returns:
filled MidaoSQLException


Copyright © 2013. All Rights Reserved.