SLING-6294 - fixing bad error messages in ExportServlet
authorJustin Edelson <justin@apache.org>
Wed, 16 Nov 2016 21:06:13 +0000 (21:06 +0000)
committerJustin Edelson <justin@apache.org>
Wed, 16 Nov 2016 21:06:13 +0000 (21:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/models/impl@1770055 13f79535-47bb-0310-9956-ffa450edef68

src/main/java/org/apache/sling/models/impl/ExportServlet.java

index df412b9..693267f 100644 (file)
@@ -63,11 +63,11 @@ class ExportServlet extends SlingSafeMethodsServlet {
         try {
             exported = accessor.getExportedString(request, options, modelFactory, exporterName);
         } catch (ExportException e) {
-            logger.error("Could not get serializer requested by model.");
+            logger.error("Could not perform export with " + exporterName + " requested by model.", e);
             response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
             return;
         } catch (MissingExporterException e) {
-            logger.error("Could not get serialize model to JSON.", e);
+            logger.error("Could not get exporter " + exporterName + " requested by model.", e);
             response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
             return;
         }