]> mj.ucw.cz Git - moe.git/blob - t/moe/__init__.py
Judges can return single-line verdicts on stderr instead of producing a status file
[moe.git] / t / moe / __init__.py
1 # No initialization needed
2
3 class MoeError(Exception):
4     pass
5
6 class SolutionError(Exception):
7
8     def __init__(self, message, stat_code=None):
9         self.stat_code = stat_code
10         self.message = message
11
12     def __str__(self):
13         if self.stat_code is None:
14             return self.message
15         else:
16             return "%s: %s" % (self.stat_code, self.message)
17
18 class TestError(SolutionError):
19     pass