Skip to content

Commit 875e608

Browse files
committed
Added an EDT error handler to see if there's a chance
1 parent 72a6d15 commit 875e608

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/AbstractGraphicsScreenshotTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ abstract class AbstractGraphicsScreenshotTest extends BaseTest {
1010
protected abstract String screenshotName();
1111

1212
@Override
13-
public boolean runTest() throws Exception {
13+
public boolean runTest() {
1414
Form form = createForm("Graphics", new BorderLayout(), screenshotName());
1515
form.add(BorderLayout.CENTER, createContent());
1616
form.show();

scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/Cn1ssDeviceRunner.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.codenameone.examples.hellocodenameone.tests;
22

3+
import com.codename1.io.Log;
34
import com.codename1.io.Util;
45
import com.codename1.testing.DeviceRunner;
56
import com.codename1.testing.TestReporting;
@@ -20,6 +21,12 @@ public final class Cn1ssDeviceRunner extends DeviceRunner {
2021
};
2122

2223
public void runSuite() {
24+
CN.callSerially(() -> {
25+
Display.getInstance().addEdtErrorHandler(e -> {
26+
log("CN1SS:ERR:exception caught in EDT " + e.getSource());
27+
Log.e((Throwable)e.getSource());
28+
});
29+
});
2330
for (BaseTest testClass : TEST_CLASSES) {
2431
CN.callSerially(() -> {
2532
log("CN1SS:INFO:suite starting test=" + testClass);

0 commit comments

Comments
 (0)