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