a light excepthook, adding a small message to the usual traceback
(etype, evalue, tb)
| 214 | |
| 215 | |
| 216 | def crash_handler_lite(etype, evalue, tb): |
| 217 | """a light excepthook, adding a small message to the usual traceback""" |
| 218 | traceback.print_exception(etype, evalue, tb) |
| 219 | |
| 220 | from IPython.core.interactiveshell import InteractiveShell |
| 221 | if InteractiveShell.initialized(): |
| 222 | # we are in a Shell environment, give %magic example |
| 223 | config = "%config " |
| 224 | else: |
| 225 | # we are not in a shell, show generic config |
| 226 | config = "c." |
| 227 | print(_lite_message_template.format(email=author_email, config=config, version=version), file=sys.stderr) |
| 228 |