]> rtime.felk.cvut.cz Git - linux-conf-perf.git/blob - scripts/exceptions.py
Execute checkmeasure only once
[linux-conf-perf.git] / scripts / exceptions.py
1 class MissingFile(Exception):
2         def __init__(self, f, advice):
3                 self.f = f
4                 self.advice = advice
5         def __str__(self):
6                 if advice == None:
7                         return "No required file: " + f 
8                 else:
9                         return "No required file: " + f + "\n" + advice
10
11 class NoSolution(Exception):
12         def __init__(self):
13                 pass
14         def __str__(self):
15                 return "SAT solver found no solution. Statement is not satisfiable."
16
17 class ConfigurationError(Exception):
18         def __init__(self, message):
19                 self.message = message;
20         def __str__(self):
21                 return "Configuration error: " + message
22
23 class NoNewConfiguration(Exception):
24         def __init__(self):
25                 pass
26         def __str__(self):
27                 return "No new configuration generated"
28 class NoApplicableConfiguration(Exception):
29         def __init__(self):
30                 pass
31         def __str__(self):
32                 return "No applicable configuration find. All generated configurations were already applied."
33
34 class ProcessFailed(Exception):
35         def __init__(self, process, returncode, output):
36                 self.process = process
37                 self.returncode = returncode
38                 self.output = output
39         def __str__(self):
40                 return "Process failed: " + str(self.process) + \
41                         " with return code: " + str(self.returncode)
42
43 class ProcessTimeout(Exception):
44         def __init__(self, process, output):
45                 self.process = process
46                 self.output = output
47         def __str__(self):
48                 return "Process timeout: " + str(self.process)
49
50 class DatabaseUninitialized(Exception):
51         def __str__(self):
52                 return "Database seems to be uninitialized."
53
54 class DirtyRepository(Exception):
55         def __init__(self, repo):
56                 self.repo = repo
57         def __str__(self):
58                 return "Detected dirty repository: " + self.repo