From 1b587f1095a03539fe1e5c31fe836c24a6a254d7 Mon Sep 17 00:00:00 2001
From: Josiah Noel <32279667+SentryMan@users.noreply.github.com>
Date: Mon, 2 Dec 2024 17:16:29 -0500
Subject: [PATCH] handle jex exceptions
---
.../io/avaje/http/generator/jex/ControllerMethodWriter.java | 4 ++--
tests/pom.xml | 2 +-
.../src/main/java/org/example/web/TestController.java | 3 +--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/http-generator-jex/src/main/java/io/avaje/http/generator/jex/ControllerMethodWriter.java b/http-generator-jex/src/main/java/io/avaje/http/generator/jex/ControllerMethodWriter.java
index a1c3e2165..e19729844 100644
--- a/http-generator-jex/src/main/java/io/avaje/http/generator/jex/ControllerMethodWriter.java
+++ b/http-generator-jex/src/main/java/io/avaje/http/generator/jex/ControllerMethodWriter.java
@@ -158,9 +158,9 @@ void writeHandler(boolean requestScoped) {
if (method.isErrorMethod()) {
writer.append(" private void _%s(Context ctx, %s ex) {", method.simpleName(), method.exceptionShortName());
} else if (isFilter) {
- writer.append(" private void _%s(Context ctx, FilterChain chain) throws IOException {", method.simpleName());
+ writer.append(" private void _%s(Context ctx, FilterChain chain) throws Exception {", method.simpleName());
} else {
- writer.append(" private void _%s(Context ctx) throws IOException {", method.simpleName());
+ writer.append(" private void _%s(Context ctx) throws Exception {", method.simpleName());
}
writer.eol();
diff --git a/tests/pom.xml b/tests/pom.xml
index aa296b045..a4a8917c4 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -15,7 +15,7 @@
5.11.3
3.26.3
2.18.2
- 3.0-RC7
+ 3.0-RC8
11.0
4.1.4
6.3.0
diff --git a/tests/test-jex/src/main/java/org/example/web/TestController.java b/tests/test-jex/src/main/java/org/example/web/TestController.java
index 3625c946d..b25c6a393 100644
--- a/tests/test-jex/src/main/java/org/example/web/TestController.java
+++ b/tests/test-jex/src/main/java/org/example/web/TestController.java
@@ -1,6 +1,5 @@
package org.example.web;
-import java.io.IOException;
import java.util.Set;
import io.avaje.http.api.BodyString;
@@ -47,7 +46,7 @@ String strBody(@BodyString String body, Context ctx) {
}
@Filter
- void filter(FilterChain chain) throws IOException {
+ void filter(FilterChain chain) throws Exception {
System.err.println("do nothing lmao");
chain.proceed();
}