sohami commented on a change in pull request #1644: DRILL-7036: Improve UI for 
alert and error messages
URL: https://github.com/apache/drill/pull/1644#discussion_r258596542
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/LogsResources.java
 ##########
 @@ -96,8 +96,13 @@ public Viewable getLogs() {
   @Path("/log/{name}/content")
   @Produces(MediaType.TEXT_HTML)
   public Viewable getLog(@PathParam("name") String name) throws IOException {
-    LogContent content = getLogJSON(name);
-    return ViewableWithPermissions.create(authEnabled.get(), 
"/rest/logs/log.ftl", sc, content);
+    try {
+      LogContent content = getLogJSON(name);
+      return ViewableWithPermissions.create(authEnabled.get(), 
"/rest/logs/log.ftl", sc, content);
+    } catch (Exception | Error e) {
+      e.printStackTrace();
 
 Review comment:
   please create a logger for this class and use that to log error.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to