aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/Main.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-09-03 11:06:41 +0300
committerGravatar Vitaly Takmazov2016-09-03 18:12:15 +0300
commit26ed351bbc59767be8ce2500cbb5250de63df5c9 (patch)
tree72f83368f4c91fb7f1b79dda750c310b2346069e /juick-www/src/main/java/com/juick/www/Main.java
parentd87a5f0ad2e912c6eff1145006c5db91de247e4b (diff)
Juick settings
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.java15
1 files changed, 13 insertions, 2 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 c67eced0..231c7f89 100644
--- a/juick-www/src/main/java/com/juick/www/Main.java
+++ b/juick-www/src/main/java/com/juick/www/Main.java
@@ -194,6 +194,7 @@ public class Main extends HttpServlet implements Stream.StreamListener {
pm.doGetSent(sql, request, response, visitor);
} catch (PebbleException e) {
log("pebble exception", e);
+ response.sendError(500);
}
break;
default:
@@ -212,7 +213,12 @@ public class Main extends HttpServlet implements Stream.StreamListener {
} else if (uri.equals("/logout")) {
login.doGetLogout(sql, request, response);
} else if (uri.equals("/settings")) {
- settings.doGet(sql, request, response);
+ try {
+ settings.doGet(sql, request, response);
+ } catch (PebbleException e) {
+ log("pebble exception", e);
+ response.sendError(500);
+ }
} else if (uri.equals("/_fblogin")) {
loginFacebook.doGet(sql, request, response);
} else if (uri.equals("/_vklogin")) {
@@ -350,7 +356,12 @@ public class Main extends HttpServlet implements Stream.StreamListener {
signup.doPost(sql, request, response);
break;
case "/settings":
- settings.doPost(sql, request, response);
+ try {
+ settings.doPost(sql, request, response);
+ } catch (PebbleException e) {
+ log("pebble exception", e);
+ response.sendError(500);
+ }
break;
default:
response.sendError(405);