itholic commented on code in PR #39693:
URL: https://github.com/apache/spark/pull/39693#discussion_r1083528302


##########
python/pyspark/errors/exceptions.py:
##########
@@ -288,7 +291,57 @@ class UnknownException(CapturedException):
 
 class SparkUpgradeException(CapturedException):
     """
-    Exception thrown because of Spark upgrade
+    Exception thrown because of Spark upgrade.
+    """
+
+
+class SparkConnectException(PySparkException):
+    """
+    Exception thrown from Spark Connect.
+    """
+
+
+class SparkConnectGrpcException(SparkConnectException):
+    """
+    Base class to handle the errors from GRPC.
+    """
+
+    def __init__(
+        self,
+        message: Optional[str] = None,
+        error_class: Optional[str] = None,
+        message_parameters: Optional[Dict[str, str]] = None,
+        plan: Optional[str] = None,
+        reason: Optional[str] = None,

Review Comment:
   Thanks for the detail!
   
   Just moved `plan` into `SparkConnectAnalysisException`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to