Skip to content

Commit 591a0e6

Browse files
committed
Use c.abort in macro error cases
1 parent 0f85051 commit 591a0e6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

parsing/src/main/scala-2/org/apache/pekko/http/ccompat/pre213macro.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ object pre213macro {
2626
else
2727
method
2828
case _ =>
29-
throw new IllegalArgumentException("Please annotate single expressions")
29+
c.abort(c.enclosingPosition, "Please annotate single expressions")
3030
}
3131
}
3232
class pre213 extends StaticAnnotation {

parsing/src/main/scala-2/org/apache/pekko/http/ccompat/since213macro.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ object since213macro {
2626
else
2727
c.Expr[Nothing](EmptyTree)
2828
case _ =>
29-
throw new IllegalArgumentException("Please annotate single expressions")
29+
c.abort(c.enclosingPosition, "Please annotate single expressions")
3030
}
3131
}
3232
class since213 extends StaticAnnotation {

0 commit comments

Comments
 (0)