aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/exceptions.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-09-03 18:55:38 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-09-03 18:55:38 +0200
commit14457f29b3d89e234d0791c4980e5cf9514185dd (patch)
tree9a12632fea816eb5a7f701d3e92670dc4009ccfe /libmproxy/exceptions.py
parent99126f62ed947847eba4cfa687cb0b0f012092bb (diff)
downloadmitmproxy-14457f29b3d89e234d0791c4980e5cf9514185dd.tar.gz
mitmproxy-14457f29b3d89e234d0791c4980e5cf9514185dd.tar.bz2
mitmproxy-14457f29b3d89e234d0791c4980e5cf9514185dd.zip
docs++
Diffstat (limited to 'libmproxy/exceptions.py')
-rw-r--r--libmproxy/exceptions.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/libmproxy/exceptions.py b/libmproxy/exceptions.py
index f34d9707..59436df7 100644
--- a/libmproxy/exceptions.py
+++ b/libmproxy/exceptions.py
@@ -1,9 +1,20 @@
+"""
+We try to be very hygienic regarding the exceptions we throw:
+Every Exception mitmproxy raises shall be a subclass of ProxyException.
+
+
+See also: http://lucumr.pocoo.org/2014/10/16/on-error-handling/
+"""
from __future__ import (absolute_import, print_function, division)
class ProxyException(Exception):
"""
Base class for all exceptions thrown by libmproxy.
+
+ Args:
+ message: the error message
+ cause: (optional) an error object that caused this exception, e.g. an IOError.
"""
def __init__(self, message, cause=None):
"""