public class SQLExceptionHandler extends Object
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected SQLExceptionAdviser |
_adviser |
| コンストラクタと説明 |
|---|
SQLExceptionHandler() |
protected final SQLExceptionAdviser _adviser
public void handleSQLException(SQLException e, SQLExceptionResource resource)
e - The instance of SQLException. (NotNull)resource - The resource, item and elements, of SQLException message. (NotNull)protected boolean isUniqueConstraintException(SQLException e)
protected void throwEntityAlreadyExistsException(SQLException e, SQLExceptionResource resource)
protected void throwSQLFailureException(SQLException e, SQLExceptionResource resource)
protected ExceptionMessageBuilder createExceptionMessageBuilder()
protected String askAdvice(SQLException e, DBDef dbdef)
protected void setupCommonElement(ExceptionMessageBuilder br, SQLException e, SQLExceptionResource resource)
protected void setupSQLExceptionElement(ExceptionMessageBuilder br, SQLException e)
protected void setupBehaviorElement(ExceptionMessageBuilder br)
protected void setupConditionBeanElement(ExceptionMessageBuilder br)
protected void setupOutsideSqlElement(ExceptionMessageBuilder br)
protected void setupTargetSqlElement(ExceptionMessageBuilder br, SQLExceptionResource resource)
If you want to hide application data on exception message, you should override and use executedSql instead of displaySql or set up nothing. But you should consider the following things:
So if you want to COMPLETELY hide application data on exception message, you should cipher your application logs (files). (If you hide JDBC driver's message too, you'll be at a loss when you debug)
br - The builder of exception message. (NotNull)resource - The resource, item and elements, of SQLException message. (NotNull)protected String extractMessage(SQLException e)
protected String extractSQLState(SQLException e)
protected String extractBehaviorInvokePath()
protected String doExtractBehaviorInvokePathFromProvider()
protected String doExtractBehabiorInvokePathFromSeparatedParts()
protected SQLExceptionAdviser createAdviser()
protected boolean hasConditionBean()
protected ConditionBean getConditionBean()
protected boolean hasOutsideSqlContext()
protected OutsideSqlContext getOutsideSqlContext()
protected String ln()
Copyright © 2014–2015 The DBFlute Project. All rights reserved.