def init_crash_handler(self):
        self.crash_handler = self.crash_handler_class(self)
        sys.excepthook = self.crash_handler
Create a crash handler, typically setting sys.excepthook to it.
dataset/ETHPy150Open ipython/ipython-py3k/IPython/core/application.py/BaseIPythonApplication.init_crash_handler