diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-11 02:17:04 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-11 02:17:04 +0200 |
commit | dd414e485212e3cab612a66d5d858c1a766ace04 (patch) | |
tree | 0dd5dd8a4f0d963f5ba43884918bf42f9991c931 /libmproxy/exceptions.py | |
parent | 40ce06e780aeb90a239c7af8b5231214d5d9f9d9 (diff) | |
download | mitmproxy-dd414e485212e3cab612a66d5d858c1a766ace04.tar.gz mitmproxy-dd414e485212e3cab612a66d5d858c1a766ace04.tar.bz2 mitmproxy-dd414e485212e3cab612a66d5d858c1a766ace04.zip |
better error messages, remove error cause
Diffstat (limited to 'libmproxy/exceptions.py')
-rw-r--r-- | libmproxy/exceptions.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libmproxy/exceptions.py b/libmproxy/exceptions.py index 7d80ce31..0e11c136 100644 --- a/libmproxy/exceptions.py +++ b/libmproxy/exceptions.py @@ -16,13 +16,11 @@ class ProxyException(Exception): message: the error message cause: (optional) an error object that caused this exception, e.g. an IOError. """ - def __init__(self, message, cause=None): + def __init__(self, message): """ :param message: Error Message - :param cause: Exception object that caused this exception to be thrown. """ super(ProxyException, self).__init__(message) - self.cause = cause class ProtocolException(ProxyException): @@ -34,8 +32,9 @@ class TlsException(ProtocolException): class ClientHandshakeException(TlsException): - # This subclass is quite useful to give hints about cert errors. - pass + def __init__(self, message, server): + super(ClientHandshakeException, self).__init__(message) + self.server = server class Socks5Exception(ProtocolException): |