mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 09:50:37 +00:00

Lines removed: over 500. Readiblity gained: A shitload Now you can actually get an overview of a manifest on a single screen height. I am sure that it will also save a lot of hassle when modifying schema in the future. No more "expected property name" etc. because of an extraneous comma Comments are of course natively support, so there's no need for this minify_json hokey pokey
26 lines
695 B
Python
26 lines
695 B
Python
|
|
|
|
class ManifestError(Exception):
|
|
def __init__(self, message, manifest_path, data_path=None):
|
|
self.message = message
|
|
self.manifest_path = manifest_path
|
|
self.data_path = data_path
|
|
|
|
def __str__(self):
|
|
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))
|
|
return '{file}: {msg}'.format(msg=self.message, file=self.manifest_path)
|
|
|
|
|
|
class TaskListError(Exception):
|
|
def __init__(self, message):
|
|
self.message = message
|
|
|
|
def __str__(self):
|
|
return 'Error in tasklist: ' + self.message
|
|
|
|
|
|
class TaskError(Exception):
|
|
pass
|