Return a string containing a crash report.
(self,traceback)
| 192 | input("Hit <Enter> to quit (your terminal may close):") |
| 193 | |
| 194 | def make_report(self,traceback): |
| 195 | """Return a string containing a crash report.""" |
| 196 | |
| 197 | sec_sep = self.section_sep |
| 198 | |
| 199 | report = ['*'*75+'\n\n'+'IPython post-mortem report\n\n'] |
| 200 | rpt_add = report.append |
| 201 | rpt_add(sys_info()) |
| 202 | |
| 203 | try: |
| 204 | config = pformat(self.app.config) |
| 205 | rpt_add(sec_sep) |
| 206 | rpt_add('Application name: %s\n\n' % self.app_name) |
| 207 | rpt_add('Current user configuration structure:\n\n') |
| 208 | rpt_add(config) |
| 209 | except: |
| 210 | pass |
| 211 | rpt_add(sec_sep+'Crash traceback:\n\n' + traceback) |
| 212 | |
| 213 | return ''.join(report) |
| 214 | |
| 215 | |
| 216 | def crash_handler_lite(etype, evalue, tb): |