X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2FResponseException.java;h=007fb8eabfd97ee39cf8214abb7d22f8da3be93b;hp=b08126b5de96b3063b0f8d187a45aca294cab156;hb=3b57f8f6b29cd8e63e20ad81ba87fdc24828f7ab;hpb=9b843f3565f84258ebea1b437ae1025dfd4a52d2 diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ResponseException.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ResponseException.java index b08126b5de..007fb8eabf 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ResponseException.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ResponseException.java @@ -19,4 +19,9 @@ public class ResponseException extends WebApplicationException { public ResponseException(Status status, String msg) { super(Response.status(status).type(MediaType.TEXT_PLAIN_TYPE).entity(msg).build()); } + + public ResponseException(Throwable cause, String msg) { + super(cause, Response.status(Status.INTERNAL_SERVER_ERROR). + type(MediaType.TEXT_PLAIN_TYPE).entity(msg).build()); + } }