2013-06-23 12:00:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
class ManifestError(Exception):
|
2014-07-05 20:01:20 +02:00
|
|
|
def __init__(self, message, manifest_path, data_path=None):
|
2014-11-30 19:16:27 +01:00
|
|
|
super(ManifestError, self).__init__(message)
|
2013-06-23 12:00:17 +02:00
|
|
|
self.message = message
|
2014-01-05 14:03:04 +01:00
|
|
|
self.manifest_path = manifest_path
|
2014-07-05 20:01:20 +02:00
|
|
|
self.data_path = data_path
|
2013-06-26 20:14:37 +02:00
|
|
|
|
2013-06-23 12:00:17 +02:00
|
|
|
def __str__(self):
|
2014-07-05 20:01:20 +02:00
|
|
|
if self.data_path is not None:
|
|
|
|
path = '.'.join(map(str, self.data_path))
|
|
|
|
return ('{msg}\n File path: {file}\n Data path: {datapath}'
|
|
|
|
.format(msg=self.message, file=self.manifest_path, datapath=path))
|
2014-01-05 15:13:09 +01:00
|
|
|
return '{file}: {msg}'.format(msg=self.message, file=self.manifest_path)
|
2013-06-23 15:26:08 +02:00
|
|
|
|
2013-06-26 20:14:37 +02:00
|
|
|
|
2013-06-23 17:03:55 +02:00
|
|
|
class TaskListError(Exception):
|
|
|
|
def __init__(self, message):
|
2014-11-30 19:16:27 +01:00
|
|
|
super(TaskListError, self).__init__(message)
|
2013-06-23 15:26:08 +02:00
|
|
|
self.message = message
|
2013-06-26 20:14:37 +02:00
|
|
|
|
2013-06-23 15:26:08 +02:00
|
|
|
def __str__(self):
|
2014-05-03 22:24:13 +02:00
|
|
|
return 'Error in tasklist: ' + self.message
|
2013-06-24 23:12:39 +02:00
|
|
|
|
2013-06-26 20:14:37 +02:00
|
|
|
|
2013-06-26 23:50:11 +02:00
|
|
|
class TaskError(Exception):
|
2013-06-24 23:12:39 +02:00
|
|
|
pass
|
2014-12-20 15:40:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
class NoMatchesError(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class TooManyMatchesError(Exception):
|
|
|
|
pass
|