public class DavException extends java.lang.Exception implements XmlSerializable
DavException
extends the Exception
class in order
to simplify handling of exceptional situations occurring during processing
of WebDAV requests and provides possibility to retrieve an Xml representation
of the error.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
XML_ERROR |
Constructor and Description |
---|
DavException(int errorCode)
Create a new
DavException . |
DavException(int errorCode,
java.lang.String message)
Create a new
DavException . |
DavException(int errorCode,
java.lang.String message,
java.lang.Throwable cause,
org.w3c.dom.Element errorCondition)
Create a new
DavException . |
DavException(int errorCode,
java.lang.Throwable cause)
Create a new
DavException . |
Modifier and Type | Method and Description |
---|---|
int |
getErrorCode()
Return the error code attached to this
DavException . |
java.lang.String |
getStatusPhrase()
Return the status phrase corresponding to the error code attached to
this
DavException . |
static java.lang.String |
getStatusPhrase(int errorCode)
Returns the status phrase for the given error code.
|
boolean |
hasErrorCondition() |
org.w3c.dom.Element |
toXml(org.w3c.dom.Document document)
Returns a DAV:error element containing the error condition or
null if no specific condition is available. |
public static final java.lang.String XML_ERROR
public DavException(int errorCode, java.lang.String message)
DavException
.errorCode
- integer specifying any of the status codes defined by
DavServletResponse
.message
- Human readable error message.DavException(int, String, Throwable, Element)
public DavException(int errorCode, java.lang.Throwable cause)
DavException
.errorCode
- integer specifying any of the status codes defined by
DavServletResponse
.cause
- Cause of this DavExceptionDavException(int, String, Throwable, Element)
public DavException(int errorCode)
DavException
.errorCode
- integer specifying any of the status codes defined by
DavServletResponse
.DavException(int, String, Throwable, Element)
public DavException(int errorCode, java.lang.String message, java.lang.Throwable cause, org.w3c.dom.Element errorCondition)
DavException
.errorCode
- integer specifying any of the status codes defined by
DavServletResponse
.message
- Human readable error message.cause
- Cause of this DavException
.errorCondition
- Xml element providing detailed information about
the error. If the condition is not null
, toXml(Document)
public int getErrorCode()
DavException
.public java.lang.String getStatusPhrase()
DavException
.getErrorCode()
public static java.lang.String getStatusPhrase(int errorCode)
errorCode
- public boolean hasErrorCondition()
public org.w3c.dom.Element toXml(org.w3c.dom.Document document)
null
if no specific condition is available. See
RFC 3253
Section 1.6 "Method Preconditions and Postconditions" for additional
information.toXml
in interface XmlSerializable
document
- null
.XmlSerializable.toXml(Document)
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"