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=e2edd5dcb2eafc3bb28eaa829313a6490adf6293;hb=66249d6ccc367fad055a269f561860d2d96af385;hpb=8ed4cbed171ee99f57e49823e971b52202637c4c 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 e2edd5dcb2..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 @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.sal.restconf.impl; import javax.ws.rs.WebApplicationException; @@ -12,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()); + } }