aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/Main.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/Main.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Main.java b/juick-www/src/main/java/com/juick/www/Main.java
index fa016edd..57704f36 100644
--- a/juick-www/src/main/java/com/juick/www/Main.java
+++ b/juick-www/src/main/java/com/juick/www/Main.java
@@ -38,6 +38,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.Socket;
+import java.net.URISyntaxException;
import java.net.URLEncoder;
import java.util.Objects;
import java.util.Properties;
@@ -233,7 +234,15 @@ public class Main extends HttpServlet implements Stream.StreamListener {
} else if (uri.equals("/help") || uri.equals("/help/")) {
help.doRedirectToHelpIndex(response);
} else if (uri.startsWith("/help/")) {
- help.doGetHelp(sql, request, response);
+ try {
+ help.doGetHelp(sql, request, response);
+ } catch (PebbleException e) {
+ log("pebble exception", e);
+ response.sendError(500);
+ } catch (URISyntaxException e) {
+ log("help exception", e);
+ response.sendError(500);
+ }
} else if (uri.startsWith("/tag/")) {
discover.doGet(sql, sqlSearch, request, response);
} else if (uri.matches("^/\\d+$")) {