Show More
@@ -1628,16 +1628,14 b' class InteractiveShell(SingletonConfigurable):' | |||
|
1628 | 1628 | WARNING: by putting in your own exception handler into IPython's main |
|
1629 | 1629 | execution loop, you run a very good chance of nasty crashes. This |
|
1630 | 1630 | facility should only be used if you really know what you are doing.""" |
|
1631 | ||
|
1632 | assert type(exc_tuple)==type(()) , \ | |
|
1633 | "The custom exceptions must be given AS A TUPLE." | |
|
1631 | if not isinstance(exc_tuple, tuple): | |
|
1632 | raise TypeError("The custom exceptions must be given as a tuple.") | |
|
1634 | 1633 | |
|
1635 | 1634 | def dummy_handler(self, etype, value, tb, tb_offset=None): |
|
1636 | 1635 | print('*** Simple custom exception handler ***') |
|
1637 | print('Exception type :',etype) | |
|
1638 | print('Exception value:',value) | |
|
1639 | print('Traceback :',tb) | |
|
1640 | #print 'Source code :','\n'.join(self.buffer) | |
|
1636 | print('Exception type :', etype) | |
|
1637 | print('Exception value:', value) | |
|
1638 | print('Traceback :', tb) | |
|
1641 | 1639 | |
|
1642 | 1640 | def validate_stb(stb): |
|
1643 | 1641 | """validate structured traceback return type |
General Comments 0
You need to be logged in to leave comments.
Login now