allisonwang-db commented on code in PR #49535:
URL: https://github.com/apache/spark/pull/49535#discussion_r1924503930


##########
python/pyspark/util.py:
##########
@@ -468,16 +468,19 @@ def handle_worker_exception(e: BaseException, outfile: 
IO) -> None:
     and exception traceback info to outfile. JVM could then read from the 
outfile and perform
     exception handling there.
     """
-    try:
-        exc_info = None
+
+    def format_exception() -> str:
+        if os.environ.get("SPARK_HIDE_TRACEBACK", False):
+            return "".join(traceback.format_exception_only(type(e), e))

Review Comment:
   This can also be used by other places such as error messages from data 
sources.



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