Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified sources/net.sf.j2s.core/dist/swingjs/SwingJS-site.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion sources/net.sf.j2s.core/dist/swingjs/timestamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20220914134307
20220915081800
Binary file modified sources/net.sf.j2s.core/dist/swingjs/ver/3.3.1/SwingJS-site.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion sources/net.sf.j2s.core/dist/swingjs/ver/3.3.1/timestamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20220914134307
20220915081800
Binary file modified sources/net.sf.j2s.java.core/dist/SwingJS-site.zip
Binary file not shown.
4 changes: 3 additions & 1 deletion sources/net.sf.j2s.java.core/src/test/Test_Error.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ public static void main(String[] args) {
* @j2sNative asdlj()
*/
} catch (Throwable e) {
e.printStackTrace();
e.printStackTrace();
boolean b = (e instanceof Error);
System.out.println(b);
}
System.out.println("Test_Error OK");
}
Expand Down
7 changes: 6 additions & 1 deletion sources/net.sf.j2s.java.core/srcjs/js/j2sClazz.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// Google closure compiler cannot handle Clazz.new or Clazz.super

// BH 2022.09.14 fix for new Error() failing; just letting java.lang.Error subclass Throwable
// BH 2022.09.15 fix for new Error() failing; just letting java.lang.Error subclass Throwable
// BH 2022.09.08 Fix new Test_Inner().getClass().getMethod("testDollar", new Class<?>[] {Test_Abstract_a.class}).getName()
// BH 2022.04.19 TypeError and ResourceError gain printStackTrace$() methods
// BH 2022.03.19 String.valueOf(Double) does not add ".0"
Expand Down Expand Up @@ -1340,6 +1340,11 @@ var getClassName = function(obj, fAsClassName) {
return "Boolean";
if (obj instanceof Array || obj.__BYTESIZE)
return "Array";
if (obj instanceof ReferenceError || obj instanceof TypeError) {
// note that this is not technically the case.
// we use this to ensure that try/catch delivers these as java.lang.Error instances
return "Error";
}
var s = obj.toString();
// "[object Int32Array]"
if (s.charAt(0) == '[')
Expand Down
7 changes: 6 additions & 1 deletion sources/net.sf.j2s.java.core/srcjs/swingjs2.js
Original file line number Diff line number Diff line change
Expand Up @@ -14045,7 +14045,7 @@ if (ev.keyCode == 9 && ev.target["data-focuscomponent"]) {

// Google closure compiler cannot handle Clazz.new or Clazz.super

// BH 2022.09.14 fix for new Error() failing; just letting java.lang.Error subclass Throwable
// BH 2022.09.15 fix for new Error() failing; just letting java.lang.Error subclass Throwable
// BH 2022.09.08 Fix new Test_Inner().getClass().getMethod("testDollar", new Class<?>[] {Test_Abstract_a.class}).getName()
// BH 2022.04.19 TypeError and ResourceError gain printStackTrace$() methods
// BH 2022.03.19 String.valueOf(Double) does not add ".0"
Expand Down Expand Up @@ -15378,6 +15378,11 @@ var getClassName = function(obj, fAsClassName) {
return "Boolean";
if (obj instanceof Array || obj.__BYTESIZE)
return "Array";
if (obj instanceof ReferenceError || obj instanceof TypeError) {
// note that this is not technically the case.
// we use this to ensure that try/catch delivers these as java.lang.Error instances
return "Error";
}
var s = obj.toString();
// "[object Int32Array]"
if (s.charAt(0) == '[')
Expand Down