File tree 1 file changed +5
-2
lines changed
compiler/src/dotty/tools/repl
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):
165
165
Nil
166
166
try load()
167
167
catch
168
- case e : ExceptionInInitializerError => List (renderError(e.getCause , sym.denot))
168
+ case e : ExceptionInInitializerError => List (renderError(e, sym.denot))
169
169
case NonFatal (e) => List (renderError(e, sym.denot))
170
170
171
171
/** 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
173
176
// detect
174
177
// at repl$.rs$line$2$.<clinit>(rs$line$2:1)
175
178
// at repl$.rs$line$2.res1(rs$line$2)
You can’t perform that action at this time.
0 commit comments