Show More
@@ -20,6 +20,7 b'' | |||
|
20 | 20 | |
|
21 | 21 | import os |
|
22 | 22 | import time |
|
23 | import sys | |
|
23 | 24 | import datetime |
|
24 | 25 | import msgpack |
|
25 | 26 | import logging |
@@ -115,7 +116,8 b' def _store_exception(exc_id, exc_type_na' | |||
|
115 | 116 | send_exc_email(request, exc_id, exc_type_name) |
|
116 | 117 | except Exception: |
|
117 | 118 | log.exception('Failed to send exception email') |
|
118 | pass | |
|
119 | exc_info = sys.exc_info() | |
|
120 | store_exception(id(exc_info), exc_info, send_email=False) | |
|
119 | 121 | |
|
120 | 122 | |
|
121 | 123 | def send_exc_email(request, exc_id, exc_type_name): |
@@ -160,7 +162,7 b' def _prepare_exception(exc_info):' | |||
|
160 | 162 | return exc_type_name, tb |
|
161 | 163 | |
|
162 | 164 | |
|
163 | def store_exception(exc_id, exc_info, prefix=global_prefix): | |
|
165 | def store_exception(exc_id, exc_info, prefix=global_prefix, send_email=None): | |
|
164 | 166 | """ |
|
165 | 167 | Example usage:: |
|
166 | 168 | |
@@ -171,7 +173,7 b' def store_exception(exc_id, exc_info, pr' | |||
|
171 | 173 | try: |
|
172 | 174 | exc_type_name, exc_traceback = _prepare_exception(exc_info) |
|
173 | 175 | _store_exception(exc_id=exc_id, exc_type_name=exc_type_name, |
|
174 | exc_traceback=exc_traceback, prefix=prefix) | |
|
176 | exc_traceback=exc_traceback, prefix=prefix, send_email=send_email) | |
|
175 | 177 | return exc_id, exc_type_name |
|
176 | 178 | except Exception: |
|
177 | 179 | log.exception('Failed to store exception `%s` information', exc_id) |
General Comments 0
You need to be logged in to leave comments.
Login now