Fixed FELIX-3434 UPnP plugin should give better error description when invoke action fails
https://issues.apache.org/jira/browse/FELIX-3434

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1309406 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/ControlServlet.java b/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/ControlServlet.java
index 88e580d..267e487 100644
--- a/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/ControlServlet.java
+++ b/webconsole-plugins/upnp/src/main/java/org/apache/felix/webconsole/plugins/upnp/internal/ControlServlet.java
@@ -180,12 +180,17 @@
         }

         catch (ServletException e)

         {

-            throw e;

+            response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);

+            response.setContentType("text/plain"); //$NON-NLS-1$

+            e.printStackTrace(response.getWriter());

+            response.flushBuffer();

         }

         catch (Exception e)

         {

-            e.printStackTrace();

-            throw new ServletException(e.toString());

+            response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);

+            response.setContentType("text/plain"); //$NON-NLS-1$

+            e.printStackTrace(response.getWriter());

+            response.flushBuffer();

         }

     }