org.apache.shiro.dao
Class DataAccessException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apache.shiro.ShiroException
                  extended by org.apache.shiro.dao.DataAccessException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
InvalidResourceUsageException

public abstract class DataAccessException
extends ShiroException

Generic exception representing a problem when attempting to access data.

The idea was borrowed from the Spring Framework, which has a nice model for a generic DAO exception hierarchy. Unfortunately we can't use it as we can't force a Spring API usage on all Shiro end-users.

Since:
1.2
See Also:
Serialized Form

Constructor Summary
DataAccessException(String message)
          Constructs a DataAccessException with a message explaining the cause of the exception.
DataAccessException(String message, Throwable cause)
          Constructs a DataAccessException with a message explaining the cause of the exception.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataAccessException

public DataAccessException(String message)
Constructs a DataAccessException with a message explaining the cause of the exception.

Parameters:
message - the message explaining the cause of the exception

DataAccessException

public DataAccessException(String message,
                           Throwable cause)
Constructs a DataAccessException with a message explaining the cause of the exception.

Parameters:
message - the explanation
cause - the root cause of the exception, typically an API-specific exception


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.