X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnorthbound%2Fnetworkconfiguration%2Fbridgedomain%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fbridgedomain%2Fnorthbound%2FBridgeDomainNorthbound.java;h=9ef56e5dc440b612f5f70e0ec823fca3172aad2c;hp=805f5be29601dcc8026d980b577e69af6758e7f1;hb=bfa2b4e3f1a93b97a7f4575116e67a2d20b53c75;hpb=36a0cd2902fcfe51b54d3d7453b3b8c4d8d7810c diff --git a/opendaylight/northbound/networkconfiguration/bridgedomain/src/main/java/org/opendaylight/controller/networkconfig/bridgedomain/northbound/BridgeDomainNorthbound.java b/opendaylight/northbound/networkconfiguration/bridgedomain/src/main/java/org/opendaylight/controller/networkconfig/bridgedomain/northbound/BridgeDomainNorthbound.java index 805f5be296..9ef56e5dc4 100644 --- a/opendaylight/northbound/networkconfiguration/bridgedomain/src/main/java/org/opendaylight/controller/networkconfig/bridgedomain/northbound/BridgeDomainNorthbound.java +++ b/opendaylight/northbound/networkconfiguration/bridgedomain/src/main/java/org/opendaylight/controller/networkconfig/bridgedomain/northbound/BridgeDomainNorthbound.java @@ -114,6 +114,8 @@ public class BridgeDomainNorthbound { 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(); } @@ -161,7 +163,7 @@ public class BridgeDomainNorthbound { 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()); @@ -215,7 +217,7 @@ public class BridgeDomainNorthbound { 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()); @@ -264,7 +266,7 @@ public class BridgeDomainNorthbound { 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());