Revision: 4299 http://vexi.svn.sourceforge.net/vexi/?rev=4299&view=rev Author: mkpg2 Date: 2011-11-29 17:42:46 +0000 (Tue, 29 Nov 2011) Log Message: ----------- Fix. NPE.
Modified Paths: -------------- trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JSDate.jpp 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/JSDate.jpp =================================================================== --- trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JSDate.jpp 2011-11-29 10:27:58 UTC (rev 4298) +++ trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JSDate.jpp 2011-11-29 17:42:46 UTC (rev 4299) @@ -74,7 +74,9 @@ //#switch(JSU.toString(method)) case "tryParseString": String s = JSU.toString(args[0]); - return new JSDate(Date.tryParseString(s)); + Date d = Date.tryParseString(s); + if(d==null) return null; + return new JSDate(d); //#end } case 2: { @@ -97,6 +99,7 @@ final Date date; public JSDate(Date date) throws JSExn { + if(date==null) throw new NullPointerException(); this.date = date; } 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-11-29 10:27:58 UTC (rev 4298) +++ trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JSExn.jpp 2011-11-29 17:42:46 UTC (rev 4299) @@ -31,6 +31,8 @@ public JSExn(InterruptedException e) { this("JS thread interrupted", SC_interrupted, e); } + // SHOULD represent java exception as a JSExn + // to make backtrace available in applications public JSExn(Throwable e) { this("Unexpected Java exception thrown by the core\n" + e.getClass().getName() + ":" + e.getMessage(),e); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, 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-novd2d _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn