self.descr = descr
self.detail = detail
self.data = data
+ self.filepath = None
+ self.relation = None
def __str__(self):
out = 'error ({0})'.format(self.e)
out = '{0}: data ({1})'.format(out, self.data)
return out
+ def color(self, descr, filepath, relation):
+ '''Add a description to the exception's error and save filepath
+ and relation
+ '''
+ self.e = f'{descr}: {self.e}'
+ self.filepath = filepath
+ self.relation = relation
+
class Error(UploadError):
'''