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