Dolda2000 GitWeb
/
jrw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
963aee0
)
Install some basic error handling in Dispatch.
master
author
Fredrik Tolf
<fredrik@dolda2000.com>
Fri, 10 Nov 2023 00:52:39 +0000
(
01:52
+0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Fri, 10 Nov 2023 00:52:39 +0000
(
01:52
+0100)
src/jrw/Dispatch.java
patch
|
blob
|
blame
|
history
diff --git
a/src/jrw/Dispatch.java
b/src/jrw/Dispatch.java
index
10b0909
..
894bbbf
100644
(file)
--- a/
src/jrw/Dispatch.java
+++ b/
src/jrw/Dispatch.java
@@
-1,6
+1,8
@@
package jrw;
import java.util.*;
package jrw;
import java.util.*;
+import java.io.*;
+import jrw.resp.*;
public class Dispatch {
public static Map<Object, Object> handle(Handler handler, Request req) {
public class Dispatch {
public static Map<Object, Object> handle(Handler handler, Request req) {
@@
-10,6
+12,9
@@
public class Dispatch {
return(handler.handle(req));
} catch(Restart r) {
handler = r;
return(handler.handle(req));
} catch(Restart r) {
handler = r;
+ } catch(Throwable t) {
+ t.printStackTrace((PrintStream)req.env.get("jagi.errors"));
+ handler = new jrw.resp.HttpError(500);
}
}
}
}
}
}