4
Exceptions for the DAVserver implementation
8
class DAV_Error(Exception):
9
""" in general we can have the following arguments:
12
2. the error result element, e.g. a <multistatus> element
15
def __init__(self,*args):
17
self.args=(args[0],"")
21
class DAV_Secret(DAV_Error):
22
""" the user is not allowed to know anything about it
24
returning this for a property value means to exclude it
25
from the response xml element.
29
DAV_Error.__init__(self,0)
32
class DAV_NotFound(DAV_Error):
33
""" a requested property was not found for a resource """
35
def __init__(self,*args):
37
DAV_Error.__init__(self,404,args[0])
39
DAV_Error.__init__(self,404)
43
class DAV_Forbidden(DAV_Error):
44
""" a method on a resource is not allowed """
46
def __init__(self,*args):
48
DAV_Error.__init__(self,403,args[0])
50
DAV_Error.__init__(self,403)