Skip to content

Instantly share code, notes, and snippets.

@josephcc
Created November 6, 2014 19:02
Show Gist options
  • Select an option

  • Save josephcc/33e1354371436e653bee to your computer and use it in GitHub Desktop.

Select an option

Save josephcc/33e1354371436e653bee to your computer and use it in GitHub Desktop.
class SwoopException(Exception):
def msg(self):
return self.__class__.__name__
class SwoopSuitesMissingException(SwoopException):
def __init__(self, missing_suites):
self.missing_suites = missing_suites
def msg(self):
return "%s %s:%s" % (super(SwoopSuitesMissingException, self).msg(), "Missing required suites: ", ", ".join(self.missing_suites))
print SwoopSuitesMissingException(['hi']).msg()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment