mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Combine catch block for readability
This commit is contained in:
parent
eb4a78fde0
commit
ee7532bc5e
1 changed files with 2 additions and 12 deletions
|
|
@ -109,13 +109,7 @@ public class InterpreterRestApi {
|
|||
Status.NOT_FOUND,
|
||||
e.getMessage(),
|
||||
ExceptionUtils.getStackTrace(e)).build();
|
||||
} catch (IOException e) {
|
||||
logger.error("Exception in InterpreterRestApi while creating ", e);
|
||||
return new JsonResponse(
|
||||
Status.INTERNAL_SERVER_ERROR,
|
||||
e.getMessage(),
|
||||
ExceptionUtils.getStackTrace(e)).build();
|
||||
} catch (RepositoryException e) {
|
||||
} catch (IOException | RepositoryException e) {
|
||||
logger.error("Exception in InterpreterRestApi while creating ", e);
|
||||
return new JsonResponse(
|
||||
Status.INTERNAL_SERVER_ERROR,
|
||||
|
|
@ -141,11 +135,7 @@ public class InterpreterRestApi {
|
|||
logger.error("Exception in InterpreterRestApi while updateSetting ", e);
|
||||
return new JsonResponse(
|
||||
Status.NOT_FOUND, e.getMessage(), ExceptionUtils.getStackTrace(e)).build();
|
||||
} catch (IOException e) {
|
||||
logger.error("Exception in InterpreterRestApi while updateSetting ", e);
|
||||
return new JsonResponse(
|
||||
Status.INTERNAL_SERVER_ERROR, e.getMessage(), ExceptionUtils.getStackTrace(e)).build();
|
||||
} catch (RepositoryException e) {
|
||||
} catch (IOException | RepositoryException e) {
|
||||
logger.error("Exception in InterpreterRestApi while updateSetting ", e);
|
||||
return new JsonResponse(
|
||||
Status.INTERNAL_SERVER_ERROR, e.getMessage(), ExceptionUtils.getStackTrace(e)).build();
|
||||
|
|
|
|||
Loading…
Reference in a new issue