Skip to content
Snippets Groups Projects
Commit ebf20c8e authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

docs

parent 4de3c3f1
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ local.properties
# Locally stored "Eclipse launch configurations"
*.launch
.vagrant/
# CDT-specific
.cproject
......
......@@ -5,6 +5,7 @@ satella
[![Test Coverage](https://codeclimate.com/github/piotrmaslanka/satella/badges/coverage.svg)](https://codeclimate.com/github/piotrmaslanka/satella/coverage)
[![PyPI](https://img.shields.io/pypi/pyversions/satella.svg)]()
[![PyPI](https://img.shields.io/pypi/implementation/satella.svg)]()
[![Documentation Status](https://readthedocs.org/projects/satella/badge/?version=latest)](http://satella.readthedocs.io/en/latest/?badge=latest)
**satella is currently undergoing a major rework. See branch satella2 for details.
This WILL break compatibility.**
......
......@@ -6,6 +6,7 @@ Welcome to satella's documentation!
:caption: Contents:
coding/monitor
instrumentation/traceback
Indices and tables
......
# Traceback
_Traceback_ object is used to preserve all the information you can get
in case of an exception. It preserves:
* Information about all stack frames in this thread
* Every local and global variable at every stack frame
* If the variable is pickable, it is pickled on the spot
* Variable's _repr_ is always preserved
* Of course variable name is saved
It also allows to pretty print the exception. Traceback is picklable, so you
can safely do so and analyze the exception at your own leisure.
Usage:
```python
from satella.instrumentation import Traceback
try:
...
except:
tb = Traceback()
print(tb.pretty_print()) # print stack trace
tb_p = tb.pickle() # pickles the traceback
```
_Traceback_ should be created in the exception it is supposed to capture,
as it captures exception info from _sys.exc_info()_.
\ No newline at end of file
# coding=UTF-8
"""
A singleton (one per process) that manages
"""
from __future__ import print_function, absolute_import, division
import six
import logging
logger = logging.getLogger(__name__)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment