Beispiel #1
0
def error(request):
    raise PublishError(public_msg="Oops, an error occured.")
Beispiel #2
0
 def __init__(self, allowed, public_msg=None, private_msg=None):
     PublishError.__init__(self, public_msg, private_msg)
     self.allowed = allowed
Beispiel #3
0
    def format(self):
        response = quixote.get_response()
        response.set_header('Allowed', ', '.join(self.allowed))

        return PublishError.format(self)
Beispiel #4
0
def publish_error(request):
    raise PublishError(public_msg="Publishing error raised by publish_error")