com.webmethods.caf.faces.data.error
Class DbClientErrorHandler

java.lang.Object
  extended by com.webmethods.caf.faces.data.error.BaseErrorHandler
      extended by com.webmethods.caf.faces.data.error.DbClientErrorHandler
All Implemented Interfaces:
IErrorHandler

public class DbClientErrorHandler
extends BaseErrorHandler

Error handler for Database connectors. It adds parsing of concrete SQL errors and codes


Field Summary
 
Fields inherited from class com.webmethods.caf.faces.data.error.BaseErrorHandler
action, ACTION_NONE, ACTION_REDIRECT, ACTION_REPORT_DETAILS, ACTION_REPORT_SUMMARY, ACTION_REPORT_SUMMARY_DETAILS, chainHandler, details, errorPage, exception, parsedDetails, parsedSummary, severity, SEVERITY_ERROR, SEVERITY_FATAL, SEVERITY_INFO, SEVERITY_WARN, source, summary, viewID
 
Constructor Summary
DbClientErrorHandler()
           
 
Method Summary
 int getErrorCode()
          Returns SQL error code from exception.
 String getSqlState()
          Returns SQL error state from exception.
protected  boolean parseError()
          Set the Summary and Details from the Exception's cause.
 void reset()
          Reset all the handler error information.
 
Methods inherited from class com.webmethods.caf.faces.data.error.BaseErrorHandler
formatMessage, getAction, getChainHandler, getDetails, getErrorPage, getException, getFacesSeverity, getSeverity, getSource, getSummary, gotoPage, handleError, handleError, isHasError, returnBack, setAction, setChainHandler, setDetails, setErrorPage, setSeverity, setSummary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbClientErrorHandler

public DbClientErrorHandler()
Method Detail

parseError

protected boolean parseError()
Set the Summary and Details from the Exception's cause. For an SQLException, also get the SQL State and vendor-specific exception code.

Overrides:
parseError in class BaseErrorHandler
Returns:
True if error was successfully parsed. Otherwise false.
See Also:
Throwable.getCause()

reset

public void reset()
Reset all the handler error information. Set error code to 0 and SQL state to null.

Specified by:
reset in interface IErrorHandler
Overrides:
reset in class BaseErrorHandler

getErrorCode

public int getErrorCode()
Returns SQL error code from exception.

Returns:
The int error code.
See Also:
SQLException.getErrorCode()

getSqlState

public String getSqlState()
Returns SQL error state from exception.

Returns:
The SQL state.
See Also:
SQLException.getSQLState()