コード例 #1
0
ファイル: __init__.py プロジェクト: mandanza/sentinel
def error(request):
    raise PublishError(public_msg="Oops, an error occured.")
コード例 #2
0
ファイル: http.py プロジェクト: jsgf/imagestore2
 def __init__(self, allowed, public_msg=None, private_msg=None):
     PublishError.__init__(self, public_msg, private_msg)
     self.allowed = allowed
コード例 #3
0
ファイル: http.py プロジェクト: jsgf/imagestore2
    def format(self):
        response = quixote.get_response()
        response.set_header('Allowed', ', '.join(self.allowed))

        return PublishError.format(self)
コード例 #4
0
ファイル: __init__.py プロジェクト: guoyu07/douban-quixote
def publish_error(request):
    raise PublishError(public_msg="Publishing error raised by publish_error")