1 | {{extend 'default.mobile/layout.html'}} |
---|
2 | |
---|
3 | {{block sectionclass}}ticket{{end}} |
---|
4 | |
---|
5 | <h2>{{=T('Error ticket')}} for "{{=app}}"</h2> |
---|
6 | <h3>{{=T('Ticket ID')}}</h3> |
---|
7 | <p>{{=ticket}}</p> |
---|
8 | {{if output:}}<h4>{{=output}}</h4>{{pass}} |
---|
9 | <h3>{{=T('Version')}}</h3> |
---|
10 | <table> |
---|
11 | <tbody> |
---|
12 | <tr> |
---|
13 | <th>web2py™</th> |
---|
14 | <td>{{=myversion}}</td> |
---|
15 | </tr> |
---|
16 | <tr> |
---|
17 | <th>Python</th> |
---|
18 | <td>{{=snapshot.get('pyver','')}}</td> |
---|
19 | </tr> |
---|
20 | </tbody> |
---|
21 | </table> |
---|
22 | <h3>{{=T('Traceback')}}</h3> |
---|
23 | <div> |
---|
24 | {{=traceback}} |
---|
25 | </div> |
---|
26 | |
---|
27 | {{if snapshot:}} |
---|
28 | {{try:}} |
---|
29 | |
---|
30 | <!-- ERROR SNAPSHOT --> |
---|
31 | |
---|
32 | <h3> |
---|
33 | {{=T('Error snapshot')}}<span>{{=T('Detailed traceback description')}}</span> |
---|
34 | </h3> |
---|
35 | |
---|
36 | <!-- SNAPSHOT LIST --> |
---|
37 | |
---|
38 | <div id="snapshot"> |
---|
39 | <!-- Exception details --> |
---|
40 | <p> |
---|
41 | <code>{{=snapshot['etype']}}({{=snapshot['evalue']}})</code> |
---|
42 | </p> |
---|
43 | <p> |
---|
44 | <a data-role="button" onclick="collapse('exception_inner');"><span>{{=T('inspect attributes')}}</span></a> |
---|
45 | </p> |
---|
46 | <div id="exception_inner"> |
---|
47 | <div> |
---|
48 | <h5>{{=T("Exception instance attributes")}}</h5> |
---|
49 | <table> |
---|
50 | <tbody> |
---|
51 | {{for k,v in snapshot['exception'].items():}} |
---|
52 | <tr> |
---|
53 | <th>{{=k}}</th> |
---|
54 | <td>{{=v}}</td> |
---|
55 | </tr> |
---|
56 | {{pass}} |
---|
57 | </tbody> |
---|
58 | </table> |
---|
59 | </div> |
---|
60 | </div> |
---|
61 | </div> |
---|
62 | |
---|
63 | <!-- FRAMES --> |
---|
64 | <div id="frames"> |
---|
65 | <h4>{{=T('Frames')}}</h4> |
---|
66 | <ul> |
---|
67 | {{for i, frame in enumerate(snapshot['frames']):}} |
---|
68 | <li> |
---|
69 | {{is_hidden = (i != len(snapshot['frames'])-1 and 'hide' or 'inspect')}} |
---|
70 | <div> |
---|
71 | <p> |
---|
72 | <strong>File {{="%s in %s at line %s" % (frame['file'], frame['func'], frame['lnum'])}}</strong> |
---|
73 | <a class="button tbbutton" onclick="collapse('{{="%s_code_inner" % i}}');"><span>{{=T("code")}}</span></a> |
---|
74 | <a class="button tbbutton" onclick="collapse('{{="%s_args_inner" % i}}');"><span>{{=T("arguments")}}</span></a> |
---|
75 | <a class="button tbbutton" onclick="collapse('{{="%s_vars_inner" % i}}');"><span>{{=T("variables")}}</span></a> |
---|
76 | </p> |
---|
77 | <div id="{{="%s_args_inner" % i}}" class="{{=is_hidden}}"> |
---|
78 | <h5>Function argument list</h5> |
---|
79 | <p>{{=frame['call']}}</p> |
---|
80 | </div> |
---|
81 | <div id="{{="%s_code_inner" % i}}" class="{{=is_hidden}}"> |
---|
82 | <h5>Code listing</h5> |
---|
83 | {{if frame['lines']:}} |
---|
84 | <pre>{{=CODE('\n'.join([x[1] for x in sorted(frame['lines'].items(),key=lambda x: x[0])]), |
---|
85 | language='python', link=None, counter=min(frame['lines'].keys()), highlight_line=frame['lnum'])}}</pre> |
---|
86 | {{pass}} |
---|
87 | </div> |
---|
88 | <div id="{{="%s_vars_inner" % i}}" class="{{=is_hidden}}"> |
---|
89 | <h5>Variables</h5> |
---|
90 | <table> |
---|
91 | <tbody> |
---|
92 | {{for k,v in frame['dump'].items():}} |
---|
93 | <tr> |
---|
94 | <th>{{=k}}</th> |
---|
95 | <td>{{=v}}</td> |
---|
96 | </tr> |
---|
97 | {{pass}} |
---|
98 | </tbody> |
---|
99 | </table> |
---|
100 | </div> |
---|
101 | </div> |
---|
102 | </li> |
---|
103 | {{pass}} |
---|
104 | </ul> |
---|
105 | </div> |
---|
106 | |
---|
107 | <!-- VIEW ENVIRONMENT --> |
---|
108 | <div class="viewenv"> |
---|
109 | <h4>Context</h4> |
---|
110 | <p class="controls"> |
---|
111 | <a class="button" onclick="jQuery('#locals').slideToggle()"><span>{{=T('locals')}}</span></a> |
---|
112 | <a class="button" onclick="jQuery('#request').slideToggle()"><span>{{=T('request')}}</span></a> |
---|
113 | <a class="button" onclick="jQuery('#session').slideToggle()"><span>{{=T('session')}}</span></a> |
---|
114 | <a class="button" onclick="jQuery('#response').slideToggle()"><span>{{=T('response')}}</span></a> |
---|
115 | </p> |
---|
116 | <div class="hide inspect" id="locals"><h6>locals</h6>{{=BEAUTIFY(snapshot['locals'])}}</div> |
---|
117 | <div class="hide inspect" id="request"><h6>request</h6>{{=BEAUTIFY(snapshot['request'])}}</div> |
---|
118 | <div class="hide inspect" id="session"><h6>session</h6>{{=BEAUTIFY(snapshot['session'])}}</div> |
---|
119 | <div class="hide inspect" id="response"><h6>response</h6>{{=BEAUTIFY(snapshot['response'])}}</div> |
---|
120 | </div> |
---|
121 | {{except Exception as e:}} |
---|
122 | <!-- this should not happen, just in case... (cannot output normal hmtl as we don't know current open tags) --> |
---|
123 | {{import traceback;tb=traceback.format_exc().replace("\n","\\n") }} |
---|
124 | <script language='javascript'>alert("Exception during snapshot rendering: {{=tb}} ");</script> |
---|
125 | {{pass}} |
---|
126 | {{pass}} |
---|
127 | |
---|
128 | <div class="errorsource"> |
---|
129 | <h3>In file: {{=layer}}</h3> |
---|
130 | {{=CODE(code.replace('\r',''),language='python',link='/examples/global/vars/')}} |
---|
131 | </div> |
---|
132 | |
---|