Class PersistenceException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.sling.api.resource.PersistenceException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PreconditionViolatedPersistenceException, TemporaryPersistenceException

public class PersistenceException extends IOException
This exception will be thrown during the commit to persist changes to a PersistableValueMap, a ModifiableValueMap or the ResourceResolver.
See Also:
  • Constructor Details

    • PersistenceException

      public PersistenceException()
      Create a new persistence exception.
    • PersistenceException

      public PersistenceException(String msg)
      Create a new persistence exception.
      Parameters:
      msg - Exception message.
    • PersistenceException

      public PersistenceException(String msg, Throwable cause)
      Create a new persistence exception.
      Parameters:
      msg - Exception message.
      cause - Exception cause.
    • PersistenceException

      public PersistenceException(String msg, Throwable cause, String resourcePath, String propertyName)
      Create a new persistence exception.
      Parameters:
      msg - Exception message.
      cause - Exception cause.
      resourcePath - The optional resource path
      propertyName - The optional property name
  • Method Details

    • getResourcePath

      public String getResourcePath()
      Get the resource path related to this exception.
      Returns:
      The resource path or null
      Since:
      2.2 (Sling API Bundle 2.2.0)
    • getPropertyName

      public String getPropertyName()
      Get the property name related to this exception.
      Returns:
      The property name or null
      Since:
      2.2 (Sling API Bundle 2.2.0)