You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/10/18 23:26:42 UTC

[sling-org-apache-sling-scripting-xproc] 05/49: SLING-908 - throw ScriptException with cause for improved error reporting

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-xproc.git

commit 51ac8219751783ed2578b9260468f3201c7b0f14
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Wed Apr 1 14:17:09 2009 +0000

    SLING-908 - throw ScriptException with cause for improved error reporting
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk@760899 13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/scripting/xproc/XProcScriptEngine.java     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/scripting/xproc/XProcScriptEngine.java b/src/main/java/org/apache/sling/scripting/xproc/XProcScriptEngine.java
index 827b641..f605ad9 100644
--- a/src/main/java/org/apache/sling/scripting/xproc/XProcScriptEngine.java
+++ b/src/main/java/org/apache/sling/scripting/xproc/XProcScriptEngine.java
@@ -64,8 +64,9 @@ public class XProcScriptEngine extends AbstractSlingScriptEngine {
 			xpl.eval();
 		} catch (Throwable t) {
 			log.error("Failure running XProc script.", t);
-            throw new ScriptException("Failure running XProc script "
-                + scriptName);
+      final ScriptException se = new ScriptException("Failure running XProc script " + scriptName);
+      se.initCause(t);
+      throw se;
 		}
 		
 		return null;

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.