Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3073#discussion_r19993020
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -1598,10 +1598,21 @@ private[spark] object Utils extends Logging {
     
       /** Return a nice string representation of the exception, including the 
stack trace. */
       def exceptionString(e: Throwable): String = {
    -    if (e == null) "" else exceptionString(getFormattedClassName(e), 
e.getMessage, e.getStackTrace)
    +    if (e == null) {
    +      ""
    +    } else {
    +      val stringWriter = new StringWriter()
    +      e.printStackTrace(new PrintWriter(stringWriter))
    +      stringWriter.toString
    +    }
       }
     
    -  /** Return a nice string representation of the exception, including the 
stack trace. */
    +  /**
    +   * Return a nice string representation of the exception, including the 
stack trace.
    +   * It's only used for backward compatibility.
    +   * Note: deprecated because it does not include the exception's cause.
    +   */
    +  @deprecated("Use exceptionString(Throwable) instead", "1.2.0")
    --- End diff --
    
    I moved this one into `ExceptionFailure` because it's only used by 
`ExceptionFailure`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to