Show error messages on non-specialized error classes (closes #113)

This commit is contained in:
Lonami Exo 2017-06-15 15:25:05 +02:00
parent 92088383f7
commit 3fccfd40e6

View File

@ -38,6 +38,10 @@ class ForbiddenError(RPCError):
code = 403
message = 'FORBIDDEN'
def __init__(self, message):
super().__init__(self, message)
self.message = message
class NotFoundError(RPCError):
"""
@ -46,6 +50,10 @@ class NotFoundError(RPCError):
code = 404
message = 'NOT_FOUND'
def __init__(self, message):
super().__init__(self, message)
self.message = message
class FloodError(RPCError):
"""
@ -67,6 +75,10 @@ class ServerError(RPCError):
code = 500
message = 'INTERNAL'
def __init__(self, message):
super().__init__(self, message)
self.message = message
class BadMessageError(Exception):
"""Occurs when handling a bad_message_notification"""