Bug 617: Remove extend files from sal-rest-connector
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / main / java / org / opendaylight / controller / sal / restconf / impl / ResponseException.java
index e2edd5dcb2eafc3bb28eaa829313a6490adf6293..007fb8eabfd97ee39cf8214abb7d22f8da3be93b 100644 (file)
@@ -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());
+    }
 }