Make is so exceptions have some message
If you don't have a message on an exception it prints out as nothing. This change will default the messaqge to the class name which should be useful. Change-Id: Ie246b37c971e8c30752714b49aa55e69482b32e7
This commit is contained in:
parent
86d988d56f
commit
7beda7dafd
@ -16,7 +16,10 @@
|
||||
|
||||
|
||||
class Base(Exception):
|
||||
pass
|
||||
def __init__(self, message=None):
|
||||
if not message:
|
||||
message = self.__class__.__name__
|
||||
super(Base, self).__init__(message)
|
||||
|
||||
|
||||
class UnsupportedVersion(Base):
|
||||
|
Loading…
x
Reference in New Issue
Block a user