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:
TerryHowe 2015-09-01 11:19:01 -06:00
parent 86d988d56f
commit 7beda7dafd

View File

@ -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):