Back to index

moin  1.9.0~rc2
Classes | Functions | Variables
MoinMoin.support.werkzeug.debug.tbtools Namespace Reference

Classes

class  Line
class  Traceback
class  Frame

Functions

def get_current_traceback

Variables

tuple _coding_re = re.compile(r'coding[:=]\s*([-\w.]+)')
tuple _line_re = re.compile(r'^(.*?)$(?m)')
tuple _funcdef_re = re.compile(r'^(\s*def\s)|(.*(?<!\w)lambda(:|\s))|^(\s*@)')
string UTF8_COOKIE = '\xef\xbb\xbf'
tuple system_exceptions = (SystemExit, KeyboardInterrupt)

Function Documentation

def MoinMoin.support.werkzeug.debug.tbtools.get_current_traceback (   ignore_system_exceptions = False,
  show_hidden_frames = False,
  skip = 0 
)
Get the current exception info as `Traceback` object.  Per default
calling this method will reraise system exceptions such as generator exit,
system exit or others.  This behavior can be disabled by passing `False`
to the function as first parameter.

Definition at line 35 of file tbtools.py.

00035 
00036                           show_hidden_frames=False, skip=0):
00037     """Get the current exception info as `Traceback` object.  Per default
00038     calling this method will reraise system exceptions such as generator exit,
00039     system exit or others.  This behavior can be disabled by passing `False`
00040     to the function as first parameter.
00041     """
00042     exc_type, exc_value, tb = sys.exc_info()
00043     if ignore_system_exceptions and exc_type in system_exceptions:
00044         raise
00045     for x in xrange(skip):
00046         if tb.tb_next is None:
00047             break
00048         tb = tb.tb_next
00049     tb = Traceback(exc_type, exc_value, tb)
00050     if not show_hidden_frames:
00051         tb.filter_hidden_frames()
00052     return tb
00053 

Here is the caller graph for this function:


Variable Documentation

tuple MoinMoin.support.werkzeug.debug.tbtools._coding_re = re.compile(r'coding[:=]\s*([-\w.]+)')

Definition at line 22 of file tbtools.py.

tuple MoinMoin.support.werkzeug.debug.tbtools._funcdef_re = re.compile(r'^(\s*def\s)|(.*(?<!\w)lambda(:|\s))|^(\s*@)')

Definition at line 24 of file tbtools.py.

tuple MoinMoin.support.werkzeug.debug.tbtools._line_re = re.compile(r'^(.*?)$(?m)')

Definition at line 23 of file tbtools.py.

tuple MoinMoin.support.werkzeug.debug.tbtools.system_exceptions = (SystemExit, KeyboardInterrupt)

Definition at line 27 of file tbtools.py.

Definition at line 25 of file tbtools.py.