Skip to content

Commit b59fa73

Browse files
Use targetException
1 parent a236853 commit b59fa73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/transform/Splicer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,10 @@ object Splicer {
355355
sw.write("Exception occurred while executing macro expansion.\n")
356356
val targetException = ex.getTargetException
357357
if (!ctx.settings.Ydebug.value) {
358-
val end = ex.getTargetException.getStackTrace.lastIndexWhere { x =>
358+
val end = targetException.getStackTrace.lastIndexWhere { x =>
359359
x.getClassName == method.getDeclaringClass.getCanonicalName && x.getMethodName == method.getName
360360
}
361-
val shortStackTrace = ex.getTargetException.getStackTrace.take(end + 1)
361+
val shortStackTrace = targetException.getStackTrace.take(end + 1)
362362
targetException.setStackTrace(shortStackTrace)
363363
}
364364
targetException.printStackTrace(new PrintWriter(sw))

0 commit comments

Comments
 (0)