aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/exceptions.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-09-21 21:49:32 -0700
committerGitHub <noreply@github.com>2016-09-21 21:49:32 -0700
commite4ae35dabb6fdeb3d9de08c6611f72062fdf0607 (patch)
tree6551658ca8867c9ce36794d0c97b8cbf2ee097fa /mitmproxy/exceptions.py
parent9e0b935fa241bc50b8c91cbdae32cb1df41ef3f1 (diff)
downloadmitmproxy-e4ae35dabb6fdeb3d9de08c6611f72062fdf0607.tar.gz
mitmproxy-e4ae35dabb6fdeb3d9de08c6611f72062fdf0607.tar.bz2
mitmproxy-e4ae35dabb6fdeb3d9de08c6611f72062fdf0607.zip
fix mitmdump error logging, fix #1549 (#1565)
This commit replaces the logging statement introduced in afe34e8b28988bdff91123862194606152c03c33 with the previous implementation where an exception is raised. ProtocolExceptions are normally logged as regular warnings, achieving the same effect for the end user. However, this retains the full stack trace for debug-level logging, which makes the analysis of client errors considerably easier.
Diffstat (limited to 'mitmproxy/exceptions.py')
-rw-r--r--mitmproxy/exceptions.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mitmproxy/exceptions.py b/mitmproxy/exceptions.py
index c4797e21..6873215c 100644
--- a/mitmproxy/exceptions.py
+++ b/mitmproxy/exceptions.py
@@ -27,6 +27,10 @@ class Kill(ProxyException):
class ProtocolException(ProxyException):
+ """
+ ProtocolExceptions are caused by invalid user input, unavailable network resources,
+ or other events that are outside of our influence.
+ """
pass