Skip to content

Exception

Main Exception class.

This class defines a getHTTPCode method, which should return the appropriate HTTP code for the Exception occurred. The default for this is 500.

This class also allows you to generate custom xml data for your exceptions. This will be displayed in the 'error' element in the failing response.

  • Full name: \Sabre\DAV\Exception
  • Parent class: Exception

Methods

getHTTPCode

Returns the HTTP statuscode for this exception.

public getHTTPCode(): int

serialize

This method allows the exception to include additional information into the WebDAV error response.

public serialize(\Sabre\DAV\Server $server, \DOMElement $errorNode): mixed

Parameters:

Parameter Type Description
$server \Sabre\DAV\Server
$errorNode \DOMElement

getHTTPHeaders

This method allows the exception to return any extra HTTP response headers.

public getHTTPHeaders(\Sabre\DAV\Server $server): array

The headers must be returned as an array.

Parameters:

Parameter Type Description
$server \Sabre\DAV\Server


Automatically generated on 2025-03-18