File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -161,13 +161,18 @@ object Splicer {
161
161
sw.write(" \n " )
162
162
throw new StopInterpretation (sw.toString, pos)
163
163
case ex : InvocationTargetException =>
164
- val sw = new StringWriter ()
165
- sw.write(" An exception occurred while executing macro expansion\n " )
166
- sw.write(ex.getTargetException.getMessage)
167
- sw.write(" \n " )
168
- ex.getTargetException.printStackTrace(new PrintWriter (sw))
169
- sw.write(" \n " )
170
- throw new StopInterpretation (sw.toString, pos)
164
+ ex.getCause match {
165
+ case cause : scala.quoted.QuoteError =>
166
+ throw cause
167
+ case _ =>
168
+ val sw = new StringWriter ()
169
+ sw.write(" An exception occurred while executing macro expansion\n " )
170
+ sw.write(ex.getTargetException.getMessage)
171
+ sw.write(" \n " )
172
+ ex.getTargetException.printStackTrace(new PrintWriter (sw))
173
+ sw.write(" \n " )
174
+ throw new StopInterpretation (sw.toString, pos)
175
+ }
171
176
172
177
}
173
178
}
You can’t perform that action at this time.
0 commit comments