diff options
Diffstat (limited to 'libmproxy/exceptions.py')
-rw-r--r-- | libmproxy/exceptions.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/libmproxy/exceptions.py b/libmproxy/exceptions.py index 6b997041..d916f457 100644 --- a/libmproxy/exceptions.py +++ b/libmproxy/exceptions.py @@ -11,18 +11,9 @@ 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): - """ - :param message: Error Message - :param cause: Exception object that caused this exception to be thrown. - """ + def __init__(self, message=None): super(ProxyException, self).__init__(message) - self.cause = cause class ProtocolException(ProxyException): @@ -33,6 +24,12 @@ class TlsException(ProtocolException): pass +class ClientHandshakeException(TlsException): + def __init__(self, message, server): + super(ClientHandshakeException, self).__init__(message) + self.server = server + + class Socks5Exception(ProtocolException): pass @@ -47,3 +44,7 @@ class InvalidCredentials(HttpException): class ServerException(ProxyException): pass + + +class ContentViewException(ProxyException): + pass |