Skip to content

Commit ea7d886

Browse files
authored
Merge pull request #527 from SentryMan/jex-exception
[Jex Generator] Handle Jex Exceptions
2 parents 5d6aca1 + 8a83170 commit ea7d886

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

http-generator-jex/src/main/java/io/avaje/http/generator/jex/ControllerMethodWriter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ void writeHandler(boolean requestScoped) {
158158
if (method.isErrorMethod()) {
159159
writer.append(" private void _%s(Context ctx, %s ex) {", method.simpleName(), method.exceptionShortName());
160160
} else if (isFilter) {
161-
writer.append(" private void _%s(Context ctx, FilterChain chain) throws IOException {", method.simpleName());
161+
writer.append(" private void _%s(Context ctx, FilterChain chain) throws Exception {", method.simpleName());
162162
} else {
163-
writer.append(" private void _%s(Context ctx) throws IOException {", method.simpleName());
163+
writer.append(" private void _%s(Context ctx) throws Exception {", method.simpleName());
164164
}
165165

166166
writer.eol();

tests/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<junit.version>5.11.3</junit.version>
1616
<assertj.version>3.26.3</assertj.version>
1717
<jackson.version>2.18.2</jackson.version>
18-
<jex.version>3.0-RC7</jex.version>
18+
<jex.version>3.0-RC8</jex.version>
1919
<avaje-inject.version>11.0</avaje-inject.version>
2020
<nima.version>4.1.4</nima.version>
2121
<javalin.version>6.3.0</javalin.version>

tests/test-jex/src/main/java/org/example/web/TestController.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.example.web;
22

3-
import java.io.IOException;
43
import java.util.Set;
54

65
import io.avaje.http.api.BodyString;
@@ -47,7 +46,7 @@ String strBody(@BodyString String body, Context ctx) {
4746
}
4847

4948
@Filter
50-
void filter(FilterChain chain) throws IOException {
49+
void filter(FilterChain chain) throws Exception {
5150
System.err.println("do nothing lmao");
5251
chain.proceed();
5352
}

0 commit comments

Comments
 (0)