diff options
Diffstat (limited to 'libmproxy/protocol2')
-rw-r--r-- | libmproxy/protocol2/http.py | 2 | ||||
-rw-r--r-- | libmproxy/protocol2/tls.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libmproxy/protocol2/http.py b/libmproxy/protocol2/http.py index 649e7843..e3878fa6 100644 --- a/libmproxy/protocol2/http.py +++ b/libmproxy/protocol2/http.py @@ -279,7 +279,7 @@ class HttpLayer(Layer): if isinstance(e, ProtocolException): raise e else: - raise ProtocolException(repr(e), e) + raise ProtocolException("Error in HTTP connection: %s" % repr(e), e) finally: flow.live = False diff --git a/libmproxy/protocol2/tls.py b/libmproxy/protocol2/tls.py index 96ee643f..ce684eb9 100644 --- a/libmproxy/protocol2/tls.py +++ b/libmproxy/protocol2/tls.py @@ -153,7 +153,7 @@ class TlsLayer(Layer): alpn_select_callback=self.__alpn_select_callback, ) except tcp.NetLibError as e: - raise ProtocolException(repr(e), e) + raise ProtocolException("Cannot establish TLS with client: %s" % repr(e), e) def _establish_tls_with_server(self): self.log("Establish TLS with server", "debug") @@ -189,9 +189,9 @@ class TlsLayer(Layer): (tls_cert_err['depth'], tls_cert_err['errno']), "error") self.log("Aborting connection attempt", "error") - raise ProtocolException(repr(e), e) + raise ProtocolException("Cannot establish TLS with server: %s" % repr(e), e) except tcp.NetLibError as e: - raise ProtocolException(repr(e), e) + raise ProtocolException("Cannot establish TLS with server: %s" % repr(e), e) self.log("ALPN selected by server: %s" % self.alpn_for_client_connection, "debug") |