pass
class SolutionErr(Exception):
- pass
+
+ def __init__(self, message, stat_code=None):
+ self.stat_code = stat_code
+ self.message = message
+
+ def __str__(self):
+ if self.stat_code is None:
+ return self.message
+ else:
+ return "%s: %s" % (self.stat_code, self.message)