exceptions hook


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. import sys, traceback, string
  2.  
  3. def myExceptHook(type, value, tb):
  4. sys.__excepthook__(type, value, tb)
  5. lines = traceback.format_exception(type, value, tb)
  6. print string.join(lines)
  7.  
  8. sys.excepthook = myExceptHook

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.