Revision: 4344
          http://vexi.svn.sourceforge.net/vexi/?rev=4344&view=rev
Author:   mkpg2
Date:     2012-01-31 04:09:18 +0000 (Tue, 31 Jan 2012)
Log Message:
-----------
Improvement. Show java stack trace in unexpected/unhandled core error messages.

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        
2012-01-27 01:16:36 UTC (rev 4343)
+++ trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/JSExn.jpp        
2012-01-31 04:09:18 UTC (rev 4344)
@@ -23,6 +23,13 @@
          }
      };
     
+     static private String append(String message, Throwable e){
+         for(StackTraceElement ste: e.getStackTrace()){
+             message = message+="\n"+ste.toString();
+         }
+         return message;
+     }
+     
     /** Maximum number of entries to report in a backtrace. */
     public static final int MAX_BACKTRACE_SIZE = 50;
 
@@ -31,13 +38,13 @@
     public JSExn(InterruptedException e) {
         this("JS thread interrupted", SC_interrupted, e); 
     }
-    // SHOULD represent java exception as a JSExn
-    // to make backtrace available in applications 
+    
+    // SHOULD be a static constructor method. 
     public JSExn(Throwable e) {
         this("Unexpected Java exception thrown by the core\n" + 
e.getClass().getName() + ":" + e.getMessage(),e);
     }
     public JSExn(String msg, Throwable e) {
-        this(msg, SC_error, e);
+        this(append(msg,e), SC_error, e);
     }
         
      

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


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to