Package org.apache.sling.api.resource
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
This exception will be thrown during the commit to persist
changes to a
PersistableValueMap
, a
ModifiableValueMap
or the ResourceResolver
.- See Also:
-
Constructor Summary
ConstructorDescriptionCreate a new persistence exception.Create a new persistence exception.PersistenceException
(String msg, Throwable cause) Create a new persistence exception.PersistenceException
(String msg, Throwable cause, String resourcePath, String propertyName) Create a new persistence exception. -
Method Summary
Modifier and TypeMethodDescriptionGet the property name related to this exception.Get the resource path related to this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PersistenceException
public PersistenceException()Create a new persistence exception. -
PersistenceException
Create a new persistence exception.- Parameters:
msg
- Exception message.
-
PersistenceException
Create a new persistence exception.- Parameters:
msg
- Exception message.cause
- Exception cause.
-
PersistenceException
Create a new persistence exception.- Parameters:
msg
- Exception message.cause
- Exception cause.resourcePath
- The optional resource pathpropertyName
- The optional property name
-
-
Method Details
-
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
Get the property name related to this exception.- Returns:
- The property name or
null
- Since:
- 2.2 (Sling API Bundle 2.2.0)
-