コード例 #1
0
def report_exception():
    """Display the current python exception in an error box, returning
	when the user closes the box. This is useful in the 'except' clause
	of a 'try' block. Uses rox.debug.show_exception()."""
    type, value, tb = sys.exc_info()
    import debug
    debug.show_exception(type, value, tb)
コード例 #2
0
ファイル: __init__.py プロジェクト: jfmc/logen
def report_exception():
    """Display the current python exception in an error box, returning
	when the user closes the box. This is useful in the 'except' clause
	of a 'try' block. Uses rox.debug.show_exception()."""
    type, value, tb = sys.exc_info()
    import debug

    debug.show_exception(type, value, tb)
コード例 #3
0
def bug(message = "A bug has been detected in this program. Please report "
		  "the problem to the authors."):
	"Display an error message and offer a debugging prompt."
	try:
		raise Exception(message)
	except:
		type, value, tb = sys.exc_info()
		import debug
		debug.show_exception(type, value, tb, auto_details = True)
コード例 #4
0
def _excepthook(ex_type, value, tb):
	_old_excepthook(ex_type, value, tb)
	if type(ex_type) == type and issubclass(ex_type, KeyboardInterrupt): return
	if have_display:
		import debug
		debug.show_exception(ex_type, value, tb)