We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 874a2ca commit 57d0ef4Copy full SHA for 57d0ef4
1 file changed
core/src/main/scala/org/apache/spark/serializer/SerializationDebugger.scala
@@ -35,8 +35,15 @@ private[serializer] object SerializationDebugger extends Logging {
35
*/
36
def improveException(obj: Any, e: NotSerializableException): NotSerializableException = {
37
if (enableDebugging && reflect != null) {
38
- new NotSerializableException(
39
- e.getMessage + "\nSerialization stack:\n" + find(obj).map("\t- " + _).mkString("\n"))
+ try {
+ new NotSerializableException(
40
+ e.getMessage + "\nSerialization stack:\n" + find(obj).map("\t- " + _).mkString("\n"))
41
+ } catch {
42
+ case e2: Exception =>
43
+ // Fall back to old exception
44
+ logWarning("Exception in serialization debugger", e2)
45
+ e
46
+ }
47
} else {
48
e
49
}
0 commit comments