YARN-3538. TimelineWebService doesn't catch runtime exception. Contributed by Steve Loughran and Tsuyoshi Ozawa.

This commit is contained in:
Junping Du 2016-11-17 16:55:39 -08:00
parent b4f1971ff1
commit f05a9ceb4a
1 changed files with 4 additions and 0 deletions

View File

@ -270,6 +270,10 @@ public class TimelineWebServices {
// The user doesn't have the access to override the existing domain.
LOG.error(e.getMessage(), e);
throw new ForbiddenException(e);
} catch (RuntimeException e) {
LOG.error("Error putting domain", e);
throw new WebApplicationException(e,
Response.Status.INTERNAL_SERVER_ERROR);
} catch (IOException e) {
LOG.error("Error putting domain", e);
throw new WebApplicationException(e,