class Tilia::Dav::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.

Public Instance Methods

http_code() click to toggle source

Returns the HTTP statuscode for this exception

@return int

# File lib/tilia/dav/exception.rb, line 14
def http_code
  500
end
http_headers(_server) click to toggle source

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

The headers must be returned as an array.

@param Server $server @return array

# File lib/tilia/dav/exception.rb, line 32
def http_headers(_server)
  {}
end
serialize(server, error_node) click to toggle source

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

@param Server server @param DOMElement error_node @return void

# File lib/tilia/dav/exception.rb, line 23
def serialize(server, error_node)
end