| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent aec3314 commit ff61107
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -275,6 +275,7 @@ public Commander(String[] args) { | |||
| 275 | 275 | } else { | |
| 276 | 276 | runner.launch(sketchArgs); | |
| 277 | 277 | } | |
| 278 | + success = !runner.vmReturnedError(); | ||
| 278 | 279 | } | |
| 279 | 280 | } else { | |
| 280 | 281 | success = false; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,6 +59,7 @@ public class Runner implements MessageConsumer { | |||
| 59 | 59 | ||
| 60 | 60 | // Running remote VM | |
| 61 | 61 | protected VirtualMachine vm; | |
| 62 | + protected boolean vmReturnedError; | ||
| 62 | 63 | ||
| 63 | 64 | // Thread transferring remote error stream to our error stream | |
| 64 | 65 | protected Thread errThread = null; | |
@@ -130,6 +131,14 @@ public VirtualMachine present(String[] args) { | |||
| 130 | 131 | } | |
| 131 | 132 | ||
| 132 | 133 | ||
| 134 | + /** | ||
| 135 | + * Whether the last invocation of launchJava() was successful or not | ||
| 136 | + */ | ||
| 137 | + public boolean vmReturnedError() { | ||
| 138 | + return vmReturnedError; | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + | ||
| 133 | 142 | /** | |
| 134 | 143 | * Simple non-blocking launch of the virtual machine. VM starts suspended. | |
| 135 | 144 | * @return debuggee VM or null on failure | |
@@ -408,6 +417,7 @@ protected void launchJava(final String[] args) { | |||
| 408 | 417 | new Thread(new Runnable() { | |
| 409 | 418 | public void run() { | |
| 410 | 419 | // PApplet.println("java starting"); | |
| 420 | + vmReturnedError = false; | ||
| 411 | 421 | process = PApplet.exec(args); | |
| 412 | 422 | try { | |
| 413 | 423 | // PApplet.println("java waiting"); | |
@@ -445,6 +455,7 @@ public void run() { | |||
| 445 | 455 | // changing this to separate editor and listener [091124] | |
| 446 | 456 | //if (editor != null) { | |
| 447 | 457 | listener.statusError("Could not run the sketch."); | |
| 458 | + vmReturnedError = true; | ||
| 448 | 459 | //} | |
| 449 | 460 | // return null; | |
| 450 | 461 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments