From 14457f29b3d89e234d0791c4980e5cf9514185dd Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 3 Sep 2015 18:55:38 +0200 Subject: docs++ --- libmproxy/exceptions.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libmproxy/exceptions.py') 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): """ -- cgit v1.2.3