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_r258586975
##########
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) {
Review comment:
`getLogJSON` is only throwing IOException, why catch `Error` here ? Since
exception is now caught in this method it's signature should change to not
throw `IOException`.
----------------------------------------------------------------
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