summaryzb commented on code in PR #50489: URL: https://github.com/apache/spark/pull/50489#discussion_r2029780546
########## core/src/main/scala/org/apache/spark/serializer/SerializationDebugger.scala: ########## @@ -111,7 +112,12 @@ private[spark] object SerializationDebugger extends Logging { visitExternalizable(e, elem :: stack) case s: Object with java.io.Serializable => - val elem = s"object (class ${s.getClass.getName}, $s)" + val str = try { + String.valueOf(s) + } catch { + case _: SparkRuntimeException => "cannot print object" + } + val elem = s"object (class ${s.getClass.getName}, $str)" Review Comment: Add test `SPARK-51691 improveException swallow underlying exception` to cover this scenario -- 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