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

    https://github.com/apache/spark/pull/1674#discussion_r15618694
  
    --- Diff: repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala ---
    @@ -557,29 +557,27 @@ class SparkILoop(in0: Option[BufferedReader], 
protected val out: JPrintWriter,
         if (isReplPower) powerCommands else Nil
       )*/
     
    -  val replayQuestionMessage =
    +  private val replayQuestionMessage =
         """|That entry seems to have slain the compiler.  Shall I replay
            |your session? I can re-run each line except the last one.
            |[y/n]
         """.trim.stripMargin
     
    -  private val crashRecovery: PartialFunction[Throwable, Boolean] = {
    -    case ex: Throwable =>
    -      echo(intp.global.throwableAsString(ex))
    -
    -      ex match {
    -        case _: NoSuchMethodError | _: NoClassDefFoundError =>
    -          echo("\nUnrecoverable error.")
    -          throw ex
    -        case _  =>
    -          def fn(): Boolean =
    -            try in.readYesOrNo(replayQuestionMessage, { echo("\nYou must 
enter y or n.") ; fn() })
    -            catch { case _: RuntimeException => false }
    -
    -          if (fn()) replay()
    -          else echo("\nAbandoning crashed session.")
    -      }
    -      true
    +  private def crashRecovery(ex: Throwable): Boolean = {
    +    echo(ex.toString)
    --- End diff --
    
    Note: if you look into the source code of the scala compiler, this is how 
throwableAsString is implemented.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to