Revision: 4184
          http://vexi.svn.sourceforge.net/vexi/?rev=4184&view=rev
Author:   mkpg2
Date:     2011-07-11 01:43:39 +0000 (Mon, 11 Jul 2011)

Log Message:
-----------
Fix. Accept cause as 2nd argument to js.Exception().

Modified Paths:
--------------
    trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JSExn.jpp

Modified: trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JSExn.jpp
===================================================================
--- trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JSExn.jpp        
2011-07-11 01:38:23 UTC (rev 4183)
+++ trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JSExn.jpp        
2011-07-11 01:43:39 UTC (rev 4184)
@@ -12,9 +12,13 @@
 public class JSExn extends Exception implements Constants { 
     static public JS Constructor = new JS.Constructor("Exception") {
          public JS new_(JS[] args) throws JSExn { 
-             JS msg = args.length>=1?args[0]:null;
-             JS type = args.length>=2?args[1]:null;
-             return new JSExn(msg, type).getObject();
+             JS msg =   args.length>=1?args[0]:null;
+             Throwable cause = null;
+             if(args.length>2 && args[2] instanceof ExnJSObj){
+                 cause = ((ExnJSObj)args[2]).getJSExn();
+             }
+             JS type =  args.length>=3?args[2]:null;
+             return new JSExn(JSU.toString(msg), type, cause).getObject();
          }
      };
     


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to