File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 33 | ^^^^^^^^^^^^^^^^^^
44 | Exception occurred while executing macro expansion.
55 | java.lang.IllegalArgumentException: requirement failed: value of StringConstant cannot be `null`
6- | at scala.Predef$.require(Predef.scala:394)
7- | at scala.quoted.runtime.impl.QuotesImpl$reflect$StringConstant$.apply(QuotesImpl.scala:2542)
8- | at scala.quoted.runtime.impl.QuotesImpl$reflect$StringConstant$.apply(QuotesImpl.scala:2541)
9- | at scala.quoted.ToExpr$StringToExpr.apply(ToExpr.scala:82)
10- | at scala.quoted.ToExpr$StringToExpr.apply(ToExpr.scala:80)
11- | at scala.quoted.Expr$.apply(Expr.scala:72)
12- | at Macros$.buildStringCode(Macro_1.scala:9)
136 |
147 |---------------------------------------------------------------------------------------------------------------------
158 |Inline stack trace
Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ object Macros {
66 def buildStringCode (using Quotes ): Expr [String ] = {
77 import quotes .reflect .*
88 val str : String = null
9- Expr (str)
9+ try
10+ Expr (str)
11+ catch
12+ case error : java.lang.IllegalArgumentException =>
13+ error.setStackTrace(Array [StackTraceElement ]())
14+ throw error
1015 }
1116}
You can’t perform that action at this time.
0 commit comments