Package coro :: Module tb
[hide private]
[frames] | no frames]

Module tb

source code

Compact stack trace functions.

This module provides some functions to get a stack trace string.

These stack traces are much more compact than the ones generated by the traceback module.

Functions [hide private]
 
_get_module_name(n) source code
 
stack_string(f=None)
Return a compact string representing the current call stack.
source code
 
traceback_string(t=None, v=None, tb=None)
Returns a compact string representing the current exception.
source code
Variables [hide private]
  __package__ = 'coro'
Function Details [hide private]

stack_string(f=None)

source code 
Return a compact string representing the current call stack.
Parameters:
  • f - : Frame object. If not specified, will use the current call position.
Returns:
Returns a string of the current stack trace.

traceback_string(t=None, v=None, tb=None)

source code 

Returns a compact string representing the current exception.

If an exception is not provided as an argument, then it will get the current exception from sys.exc_info.

Parameters:
  • t - : Exception type.
  • v - : Exception value.
  • tb - : Traceback object.
Returns:
Returns a string of the current exception and stack trace.