28
28
template_path = 'loggerhead.templates.error'
30
30
def __init__(self, branch, exc_info):
31
super(ErrorUI, self).__init__(branch, lambda:None)
31
super(ErrorUI, self).__init__(branch, lambda: None)
32
32
self.exc_info = exc_info
34
34
def get_values(self, path, kwargs, response):
35
35
exc_type, exc_object, exc_tb = self.exc_info
36
36
description = StringIO()
37
37
traceback.print_exception(exc_type, exc_object, None, file=description)
38
directory_breadcrumbs = (
39
util.directory_breadcrumbs(
40
self._branch.friendly_name,
38
directory_breadcrumbs = util.directory_breadcrumbs(
39
self._branch.friendly_name, self._branch.is_root, 'changes')
44
41
'branch': self._branch,
45
42
'error_title': ('An unexpected error occurred while'
46
'proccesing the request:'),
43
'processing the request:'),
47
44
'error_description': description.getvalue(),
48
45
'directory_breadcrumbs': directory_breadcrumbs,