java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.jackrabbit.webdav.DavException
All Implemented Interfaces:
Serializable, XmlSerializable

public class DavException extends 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.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getErrorCode

      public int getErrorCode()
      Return the error code attached to this DavException.
      Returns:
      errorCode
    • getStatusPhrase

      public String getStatusPhrase()
      Return the status phrase corresponding to the error code attached to this DavException.
      Returns:
      status phrase corresponding to the error code.
      See Also:
    • getStatusPhrase

      public static String getStatusPhrase(int errorCode)
      Returns the status phrase for the given error code.
      Parameters:
      errorCode -
      Returns:
      status phrase corresponding to the given error code.
    • hasErrorCondition

      public boolean hasErrorCondition()
      Returns:
      true if a error condition has been specified, false otherwise.
    • getErrorCondition

      public Element getErrorCondition()
      Return the error condition attached to this DavException.
      Returns:
      errorCondition
    • toXml

      public Element toXml(Document document)
      Returns a DAV:error element containing the error condition or null if no specific condition is available. See RFC 3253 Section 1.6 "Method Preconditions and Postconditions" for additional information.
      Specified by:
      toXml in interface XmlSerializable
      Parameters:
      document -
      Returns:
      A DAV:error element indicating the error cause or null.
      See Also: