You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/05/25 20:38:52 UTC

[GitHub] [spark] viirya commented on a change in pull request #32650: [SPARK-32194][PYTHON] Use proper exception classes instead of plain Exception

viirya commented on a change in pull request #32650:
URL: https://github.com/apache/spark/pull/32650#discussion_r639183663



##########
File path: python/pyspark/context.py
##########
@@ -188,9 +188,9 @@ def _do_init(self, master, appName, sparkHome, pyFiles, environment, batchSize,
 
         # Check that we have at least the required parameters
         if not self._conf.contains("spark.master"):
-            raise Exception("A master URL must be set in your configuration")
+            raise TypeError("A master URL must be set in your configuration")
         if not self._conf.contains("spark.app.name"):
-            raise Exception("An application name must be set in your configuration")
+            raise TypeError("An application name must be set in your configuration")

Review comment:
       Seems like `ValueError` or `RuntimeError`?




-- 
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.

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



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