]> mj.ucw.cz Git - moe.git/blobdiff - t/moe/__init__.py
Batch task testing works (sort of)
[moe.git] / t / moe / __init__.py
index 02cc0ce1f1499802d4572b18eb9efe52bff3a047..26e4f24ebf7951e5fc46bce03361b014eb3fd75d 100644 (file)
@@ -1 +1,16 @@
 # No initialization needed
+
+class MoeErr(Exception):
+    pass
+
+class SolutionErr(Exception):
+
+    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)