]> rtime.felk.cvut.cz Git - linux-conf-perf.git/blob - scripts/exceptions.py
Add implementation of hash indexing of configurations
[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 PhaseMismatch(Exception):
18         def __init__(self):
19                 pass
20         def __str__(self):
21                 return "Phase in " + conf.phase_file + " is unknown."
22
23 class ConfigurationError(Exception):
24         def __init__(self, message):
25                 self.message = message;
26         def __str__(self):
27                 return "Configuration error: " + message
28
29 class NoApplicableSolution(Exception):
30         def __init__(self):
31                 pass
32         def __str__(self):
33                 return "No applicable solution find. All generated solutions were already applied."
34
35 class ProcessFailed(Exception):
36         def __init__(self, process, returncode):
37                 self.process = process
38                 self.returncode = returncode
39         def __str__(self):
40                 return "Process failed: " + str(self.process) + \
41                         " with return code: " + str(self.returncode)