org.apache.jackrabbit.webdav.jcr
Class JcrDavException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.jackrabbit.webdav.DavException
org.apache.jackrabbit.webdav.jcr.JcrDavException
- All Implemented Interfaces:
- Serializable, XmlSerializable
public class JcrDavException
- extends DavException
JcrDavException
extends the DavException
in order to
wrap various repository exceptions.
- See Also:
- Serialized Form
Method Summary |
boolean |
hasErrorCondition()
Always returns true. |
Element |
toXml(Document document)
Returns a DAV:error Xml element containing the exceptions class and the
message as child elements. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
JcrDavException
public JcrDavException(Throwable cause,
int errorCode)
- Create a new
JcrDavException
.
- Parameters:
cause
- The original cause of this DavException
. Note, that
in contrast to Throwable.Throwable(Throwable)
, Throwable.Throwable(String, Throwable)
and
Throwable.initCause(Throwable)
the cause must not be null
.errorCode
- Status code for the response.
- Throws:
NullPointerException
- if the given exception is null
.- See Also:
DavException.DavException(int, String)
,
DavException.DavException(int)
JcrDavException
public JcrDavException(RepositoryException cause)
- Same as
JcrDavException(Throwable, int)
where the
error code is retrieved from an internal mapping.
- Parameters:
cause
- Cause of this DavException
- Throws:
NullPointerException
- if the given exception is null
.- See Also:
JcrDavException(Throwable, int)
hasErrorCondition
public boolean hasErrorCondition()
- Always returns true.
- Overrides:
hasErrorCondition
in class DavException
- Returns:
- true
toXml
public Element toXml(Document document)
- Returns a DAV:error Xml element containing the exceptions class and the
message as child elements.
- Specified by:
toXml
in interface XmlSerializable
- Overrides:
toXml
in class DavException
- Parameters:
document
-
- Returns:
- Xml representation of this exception.
- See Also:
XmlSerializable.toXml(Document)
Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.