netconf_ssh_output.setDaemon(false);
netconf_ssh_output.start();
- } catch (Throwable t){
- logger.error("SSH bridge couldn't create echo socket",t.getMessage(),t);
+ } catch (Exception t) {
+ logger.error("SSH bridge could not create echo socket: {}", t.getMessage(), t);
try {
if (netconf_ssh_input!=null){
Thread.currentThread().interrupt();
logger.error("netconf_ssh_output join error ",e);
}
-
}
} else {
try {
if (status.getCode().equals(StatusCode.SUCCESS)) {
return Response.status(Response.Status.CREATED).build();
}
+ } catch (Error e) {
+ throw e;
} catch (Throwable t) {
return Response.status(Response.Status.PRECONDITION_FAILED).build();
}
if (status.getCode().equals(StatusCode.SUCCESS)) {
return Response.status(Response.Status.OK).build();
}
- } catch (Throwable t) {
+ } catch (Exception t) {
return Response.status(Response.Status.PRECONDITION_FAILED).build();
}
throw new ResourceNotFoundException(status.getDescription());
if (status.getCode().equals(StatusCode.SUCCESS)) {
return Response.status(Response.Status.CREATED).build();
}
- } catch (Throwable t) {
+ } catch (Exception t) {
return Response.status(Response.Status.PRECONDITION_FAILED).build();
}
throw new ResourceNotFoundException(status.getDescription());
if (status.getCode().equals(StatusCode.SUCCESS)) {
return Response.status(Response.Status.OK).build();
}
- } catch (Throwable t) {
+ } catch (Exception t) {
return Response.status(Response.Status.PRECONDITION_FAILED).build();
}
throw new ResourceNotFoundException(status.getDescription());