2
# Copyright (C) 2008 Guillermo Gonzalez <guillo.gonzo@gmail.com>
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 2 of the License, or
7
# (at your option) any later version.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
from loggerhead.controllers import TemplatedBranchView
21
class ErrorUI(TemplatedBranchView):
23
template_path = 'loggerhead.templates.error'
25
def __init__(self, branch, exc_info):
26
super(ErrorUI, self).__init__(branch, None)
27
self.exc_info = exc_info
29
def get_values(self, h, args, kw, headers):
30
exc_type, exc_object, exc_tb = self.exc_info
32
'error_title':'Error',
33
'error_description':exc_object,
34
'error_properties':[self.exc_info],
b'\\ No newline at end of file'