aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/exceptions.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-09-11 20:02:05 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-09-11 20:02:05 +1200
commit34e17efaa0a396b3a9455f1852c41b14bec16762 (patch)
treee5f71920126edcd59a71cee593ae5721f3f1c953 /mitmproxy/exceptions.py
parentcfb943bfdda025aba8e34bf2e9f3500cc786ccbc (diff)
downloadmitmproxy-34e17efaa0a396b3a9455f1852c41b14bec16762.tar.gz
mitmproxy-34e17efaa0a396b3a9455f1852c41b14bec16762.tar.bz2
mitmproxy-34e17efaa0a396b3a9455f1852c41b14bec16762.zip
Remove obsolete exceptions.ScriptException
Diffstat (limited to 'mitmproxy/exceptions.py')
-rw-r--r--mitmproxy/exceptions.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/mitmproxy/exceptions.py b/mitmproxy/exceptions.py
index 1bc23a24..c4797e21 100644
--- a/mitmproxy/exceptions.py
+++ b/mitmproxy/exceptions.py
@@ -7,9 +7,6 @@ See also: http://lucumr.pocoo.org/2014/10/16/on-error-handling/
"""
from __future__ import absolute_import, print_function, division
-import sys
-import traceback
-
class ProxyException(Exception):
@@ -78,27 +75,6 @@ class ReplayException(ProxyException):
pass
-class ScriptException(ProxyException):
-
- @classmethod
- def from_exception_context(cls, cut_tb=1):
- """
- Must be called while the current stack handles an exception.
-
- Args:
- cut_tb: remove N frames from the stack trace to hide internal calls.
- """
- exc_type, exc_value, exc_traceback = sys.exc_info()
-
- while cut_tb > 0:
- exc_traceback = exc_traceback.tb_next
- cut_tb -= 1
-
- tb = "".join(traceback.format_exception(exc_type, exc_value, exc_traceback))
-
- return cls(tb)
-
-
class FlowReadException(ProxyException):
pass