Fix track_exception for non-str exception args

exc_value.args may contain members that aren't strings, which will cause ''.join() to raise an error. Calling str on the exception will produce the message as intended by the exception creator, which for most standard exceptions is the same as ''.join(args).
This commit is contained in:
Steve Dower 2015-01-30 07:35:54 -08:00
Родитель 51d9988a1f
Коммит 7b1a60ba32
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -98,7 +98,7 @@ class TelemetryClient(object):
details.id = 1 details.id = 1
details.outer_id = 0 details.outer_id = 0
details.type_name = type.__name__ details.type_name = type.__name__
details.message = ''.join(value.args) details.message = str(value)
details.has_full_stack = True details.has_full_stack = True
counter = 0 counter = 0
for tb_frame_file, tb_frame_line, tb_frame_function, tb_frame_text in traceback.extract_tb(tb): for tb_frame_file, tb_frame_line, tb_frame_function, tb_frame_text in traceback.extract_tb(tb):