This is an automated email from the ASF dual-hosted git repository.
mdedetrich pushed a commit to branch 1.0.x
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-http.git
The following commit(s) were added to refs/heads/1.0.x by this push:
new 7d2bc01d0 Use c.abort in macro error cases
7d2bc01d0 is described below
commit 7d2bc01d0758be3c2e245c593f4e04e3356e8397
Author: Matthew de Detrich <[email protected]>
AuthorDate: Wed Aug 23 13:28:30 2023 +0200
Use c.abort in macro error cases
(cherry picked from commit 591a0e6d5bfebcdf28b1f19897a2929d59bc2a1b)
---
.../src/main/scala-2/org/apache/pekko/http/ccompat/pre213macro.scala | 2 +-
.../src/main/scala-2/org/apache/pekko/http/ccompat/since213macro.scala | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
a/parsing/src/main/scala-2/org/apache/pekko/http/ccompat/pre213macro.scala
b/parsing/src/main/scala-2/org/apache/pekko/http/ccompat/pre213macro.scala
index 58db14cc8..1edf051ef 100644
--- a/parsing/src/main/scala-2/org/apache/pekko/http/ccompat/pre213macro.scala
+++ b/parsing/src/main/scala-2/org/apache/pekko/http/ccompat/pre213macro.scala
@@ -26,7 +26,7 @@ object pre213macro {
else
method
case _ =>
- throw new IllegalArgumentException("Please annotate single expressions")
+ c.abort(c.enclosingPosition, "Please annotate single expressions")
}
}
class pre213 extends StaticAnnotation {
diff --git
a/parsing/src/main/scala-2/org/apache/pekko/http/ccompat/since213macro.scala
b/parsing/src/main/scala-2/org/apache/pekko/http/ccompat/since213macro.scala
index 11baa017c..f118a9abb 100644
--- a/parsing/src/main/scala-2/org/apache/pekko/http/ccompat/since213macro.scala
+++ b/parsing/src/main/scala-2/org/apache/pekko/http/ccompat/since213macro.scala
@@ -26,7 +26,7 @@ object since213macro {
else
c.Expr[Nothing](EmptyTree)
case _ =>
- throw new IllegalArgumentException("Please annotate single expressions")
+ c.abort(c.enclosingPosition, "Please annotate single expressions")
}
}
class since213 extends StaticAnnotation {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]