-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathexample_report.html
228 lines (125 loc) · 5.93 KB
/
example_report.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div style="width: 800px;">
<h2>
My App (v1.1.350)
</h2>
<hr>
<p>A crash was detected on 27 July 2015 at 07:02 PM.</p>
</div>
<div style="width: 800px;">
<h4>Traceback (most recent call last):</h4>
<b>
<DL style="background-color:#FFF099; border-style:solid; border-width: 1px; padding: 10px;" >
File /home/calvin/pycharm-4.5/helpers/pydev/pydevd.py, line: 2357 in <module>
<DD>
globals = debugger.run(setup['file'], None, None, is_module)
</DD>
</DL>
<DL style="background-color:#FFF099; border-style:solid; border-width: 1px; padding: 10px;" >
File /home/calvin/pycharm-4.5/helpers/pydev/pydevd.py, line: 1777 in run
<DD>
pydev_imports.execfile(file, globals, locals) # execute the script
</DD>
</DL>
<DL style="background-color:#FFF099; border-style:solid; border-width: 1px; padding: 10px;" >
File /home/calvin/lobocv/crashreporter/example.py, line: 24 in <module>
<DD>
combine_ages(calvin, bob)
</DD>
</DL>
<DL style="background-color:#FFF099; border-style:solid; border-width: 1px; padding: 10px;" >
File /home/calvin/lobocv/crashreporter/example.py, line: 11 in combine_ages
<DD>
return person_a.age + person_b.age, Person.__name__
</DD>
</DL>
<DL style="background-color:#FFF099; border-style:solid; border-width: 1px; padding: 10px " >
<DD>
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
</DD>
</DL>
</b>
<hr>
<h4>Source Code</h4>
<div style="background-color:#FFF099; border-style:solid; border-width: 1px; padding: 10px;">
<ol start="1">
<li style="padding-left"> from crashreporter import CrashReporter
</li>
<li style="padding-left: -30px;">
</li>
<li style="padding-left: -30px;">class Person(object):
</li>
<li style="padding-left: -30px;">
</li>
<li style="padding-left: 0px;">def __init__(self, name, age=None):
</li>
<li style="padding-left: 30px;">self.name = name
</li>
<li style="padding-left: 30px;">self.age = age
</li>
<li style="padding-left: -30px;">
</li>
<li style="padding-left: -30px;">def combine_ages(person_a, person_b):
</li>
<li style="padding-left: 0px;">a_local_variable = 134
</li>
<li style="background-color:#BB0000; padding-left: 0px;">return person_a.age + person_b.age, Person.__name__
</li>
<li style="padding-left: -30px;">
</li>
<li style="padding-left: -30px;">if __name__ == '__main__':
</li>
<li style="padding-left: 0px;">cr = CrashReporter(report_dir='/home/calvin/crashreporter',
</li>
<li style="padding-left: 120px;"> check_interval=10,
</li>
<li style="padding-left: 120px;"> config='./crashreporter.cfg',
</li>
<li style="padding-left: 120px;"> )
</li>
<li style="padding-left: -30px;">
</li>
<li style="padding-left: 0px;">cr.application_name = 'My App'
</li>
<li style="padding-left: 0px;">cr.application_version = '1.1.350'
</li>
<li style="padding-left: -30px;">
</li>
<li style="padding-left: 0px;">calvin = Person('calvin', age=25)
</li>
<li style="padding-left: 0px;">bob = Person('bob')
</li>
<li style="padding-left: 0px;">combine_ages(calvin, bob)
</li>
<li style="padding-left: -30px;">
</li>
<li style="padding-left: 0px;">while 1:
</li>
<li style="padding-left: 30px;">pass</li>
</ol>
</div>
<hr>
<h4>Local Variables in the scope of combine_ages</h4>
<table border="1" style="width:800px">
<tr>
<td style="width:30%">a_local_variable</td>
<td>134</td>
</tr>
<tr>
<td style="width:30%">person_b</td>
<td><__main__.Person object at 0x7faf13df3710></td>
</tr>
<tr>
<td style="width:30%">person_a</td>
<td><__main__.Person object at 0x7faf13df3750></td>
</tr>
</table>
</div>
</body>
</html>