Skip to content

Commit

Permalink
Refix WorksheetTest.evaluationException
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Dec 1, 2022
1 parent 6ef28df commit e2a5290
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions compiler/src/dotty/tools/repl/Rendering.scala
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,14 @@ private[repl] class Rendering(parentClassLoader: Option[ClassLoader] = None):
Nil
try load()
catch
case e: ExceptionInInitializerError => List(renderError(e.getCause, sym.denot))
case e: ExceptionInInitializerError => List(renderError(e, sym.denot))
case NonFatal(e) => List(renderError(e, sym.denot))

/** Render the stack trace of the underlying exception. */
def renderError(cause: Throwable, d: Denotation)(using Context): Diagnostic =
def renderError(thr: Throwable, d: Denotation)(using Context): Diagnostic =
val cause = thr.getCause match
case e: ExceptionInInitializerError => e.getCause
case e => e
// detect
//at repl$.rs$line$2$.<clinit>(rs$line$2:1)
//at repl$.rs$line$2.res1(rs$line$2)
Expand Down

0 comments on commit e2a5290

Please sign in to comment.