File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
compiler/src/dotty/tools/repl Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -165,11 +165,14 @@ private[repl] class Rendering(parentClassLoader: Option[ClassLoader] = None):
165165 Nil
166166 try load()
167167 catch
168- case e : ExceptionInInitializerError => List (renderError(e.getCause , sym.denot))
168+ case e : ExceptionInInitializerError => List (renderError(e, sym.denot))
169169 case NonFatal (e) => List (renderError(e, sym.denot))
170170
171171 /** Render the stack trace of the underlying exception. */
172- def renderError (cause : Throwable , d : Denotation )(using Context ): Diagnostic =
172+ def renderError (thr : Throwable , d : Denotation )(using Context ): Diagnostic =
173+ val cause = thr.getCause match
174+ case e : ExceptionInInitializerError => e.getCause
175+ case e => e
173176 // detect
174177 // at repl$.rs$line$2$.<clinit>(rs$line$2:1)
175178 // at repl$.rs$line$2.res1(rs$line$2)
You can’t perform that action at this time.
0 commit comments