incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaven...@apache.org
Subject git commit: fixed BLUR-406, show generic message if exception has no message
Date Thu, 05 Mar 2015 16:25:24 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/master 55a5d1ae8 -> 59013d5ff


fixed BLUR-406, show generic message if exception has no message


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/59013d5f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/59013d5f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/59013d5f

Branch: refs/heads/master
Commit: 59013d5ff4d9085780a01771fe6a6bd358869c23
Parents: 55a5d1a
Author: Andrew Avenoso <andrew.va@gmail.com>
Authored: Thu Mar 5 11:15:39 2015 -0500
Committer: Andrew Avenoso <andrew.va@gmail.com>
Committed: Thu Mar 5 11:15:39 2015 -0500

----------------------------------------------------------------------
 .../org/apache/blur/console/servlets/BaseConsoleServlet.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/59013d5f/blur-console/src/main/java/org/apache/blur/console/servlets/BaseConsoleServlet.java
----------------------------------------------------------------------
diff --git a/blur-console/src/main/java/org/apache/blur/console/servlets/BaseConsoleServlet.java
b/blur-console/src/main/java/org/apache/blur/console/servlets/BaseConsoleServlet.java
index c7e9082..d9f035d 100644
--- a/blur-console/src/main/java/org/apache/blur/console/servlets/BaseConsoleServlet.java
+++ b/blur-console/src/main/java/org/apache/blur/console/servlets/BaseConsoleServlet.java
@@ -36,7 +36,10 @@ public abstract class BaseConsoleServlet extends HttpServlet {
 
   protected void sendError(HttpServletResponse response, Exception e) throws IOException
{
     log.error("Error processing request.", e);
-    String body = e.getMessage();
+    String body = "Error processing request";
+    if(e != null && e.getMessage() != null) {
+      body = e.getMessage();
+    }
     response.setContentType("application/json");
     response.setContentLength(body.getBytes().length);
     response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);


Mime
View raw message