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/04/12 03:06:31 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #31238: [SPARK-32194][PYTHON] Add more refined pyspark exceptions

HyukjinKwon commented on a change in pull request #31238:
URL: https://github.com/apache/spark/pull/31238#discussion_r611301291



##########
File path: python/pyspark/accumulators.py
##########
@@ -123,14 +124,16 @@ def __reduce__(self):
     def value(self):
         """Get the accumulator's value; only usable in driver program"""
         if self._deserialized:
-            raise Exception("Accumulator.value cannot be accessed inside tasks")

Review comment:
       @LielBach, I am very sorry for late responses. I have thought about this and had some discussions offline with other people too. Can we, for now, switch `Exception` to use built-in exception classes for now? For example, `Exception` here could be just simply `RuntimeError`.
   
   Throwing the plain `Exception` is the main reason I raised the JIRA in any event.




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