##// END OF EJS Templates
Catch UnicodeDecodeError from file lying about its encoding...
Thomas Kluyver -
Show More
@@ -1130,6 +1130,12 b' class VerboseTB(TBTools):'
1130 # problems, but it generates empty tracebacks for console errors
1130 # problems, but it generates empty tracebacks for console errors
1131 # (5 blanks lines) where none should be returned.
1131 # (5 blanks lines) where none should be returned.
1132 return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
1132 return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
1133 except UnicodeDecodeError:
1134 # This can occur if a file's encoding magic comment is wrong.
1135 # I can't see a way to recover without duplicating a bunch of code
1136 # from the stdlib traceback module. --TK
1137 error('\nUnicodeDecodeError while processing traceback.\n')
1138 return None
1133 except:
1139 except:
1134 # FIXME: I've been getting many crash reports from python 2.3
1140 # FIXME: I've been getting many crash reports from python 2.3
1135 # users, traceable to inspect.py. If I can find a small test-case
1141 # users, traceable to inspect.py. If I can find a small test-case
General Comments 0
You need to be logged in to leave comments. Login now