From 9bf36c8b0fde07135db513598256518402c0bdec Mon Sep 17 00:00:00 2001 From: Michael Leuschel <leuschel@cs.uni-duesseldorf.de> Date: Tue, 26 Nov 2019 10:58:07 +0100 Subject: [PATCH] try to catch exitValue !=0 when starting ProB2UI --- de.prob.ui/src/de/prob/ui/eventb/OpenClassicHandler.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/de.prob.ui/src/de/prob/ui/eventb/OpenClassicHandler.java b/de.prob.ui/src/de/prob/ui/eventb/OpenClassicHandler.java index e0a37c14..e5b078bb 100644 --- a/de.prob.ui/src/de/prob/ui/eventb/OpenClassicHandler.java +++ b/de.prob.ui/src/de/prob/ui/eventb/OpenClassicHandler.java @@ -120,8 +120,14 @@ public class OpenClassicHandler extends AbstractHandler implements IHandler { final BufferedReader output = new BufferedReader( new InputStreamReader(process.getInputStream())); new Thread(new ClassicConsole(output)).start(); + + process.waitFor(); // I hope this will not block Rodin - } catch (IOException e) { + if (process.exitValue() != 0) { + Logger.notifyUserWithoutBugreport("Error launching ProB2UI with java -jar" + probBinary + ". Exit code: " + process.exitValue()); + } + + } catch (IOException | InterruptedException e) { Logger.notifyUserWithoutBugreport("You need to specify a correct location for " + PROB2_NAME + ". See Preferences -> ProB Standalone.\n" + PROB2_NAME + " location: "+ probBinary + -- GitLab