aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/sql/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/pyspark/sql/utils.py')
-rw-r--r--python/pyspark/sql/utils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/pyspark/sql/utils.py b/python/pyspark/sql/utils.py
index 7ea0e0d5c9..cb172d21f3 100644
--- a/python/pyspark/sql/utils.py
+++ b/python/pyspark/sql/utils.py
@@ -45,6 +45,12 @@ class IllegalArgumentException(CapturedException):
"""
+class ContinuousQueryException(CapturedException):
+ """
+ Exception that stopped a :class:`ContinuousQuery`.
+ """
+
+
def capture_sql_exception(f):
def deco(*a, **kw):
try:
@@ -57,6 +63,8 @@ def capture_sql_exception(f):
raise AnalysisException(s.split(': ', 1)[1], stackTrace)
if s.startswith('org.apache.spark.sql.catalyst.parser.ParseException: '):
raise ParseException(s.split(': ', 1)[1], stackTrace)
+ if s.startswith('org.apache.spark.sql.ContinuousQueryException: '):
+ raise ContinuousQueryException(s.split(': ', 1)[1], stackTrace)
if s.startswith('java.lang.IllegalArgumentException: '):
raise IllegalArgumentException(s.split(': ', 1)[1], stackTrace)
raise