diff --git a/de.prob.core/src/de/prob/cli/CliStarter.java b/de.prob.core/src/de/prob/cli/CliStarter.java index 089d984770005d1a3e7fd27ed1cb1294947ced66..fe265146b0f2ac91bc6fef72d2372903cdae5991 100644 --- a/de.prob.core/src/de/prob/cli/CliStarter.java +++ b/de.prob.core/src/de/prob/cli/CliStarter.java @@ -102,10 +102,7 @@ public final class CliStarter { try { prologProcess = pb.start(); } catch (IOException e) { - final String message = "Problem while starting up ProB CLI. Tried to execute:" - + executable; - Logger.notifyUser(message, e); - throw new CliException(message, e, true); + throw new CliException("Problem while starting up ProB CLI. Tried to execute:" + executable, e, false); } Assert.isNotNull(prologProcess); @@ -144,10 +141,7 @@ public final class CliStarter { } else if (os.equals(Platform.OS_LINUX)) { subdir = "linux64"; } else { - final CliException cliException = new CliException( - "ProB does not support the plattform: " + os); - cliException.notifyUserOnce(); - throw cliException; + throw new CliException("ProB does not support the plattform: " + os); } return new OsSpecificInfo(subdir, "probcli.sh", @@ -187,9 +181,7 @@ public final class CliStarter { || line.contains("starting command loop"); // printed in prob_socketserver.pl } } catch (IOException e) { - final String message = "Problem while starting ProB. Cannot read from input stream."; - Logger.notifyUser(message, e); - throw new CliException(message, e, true); + throw new CliException("Problem while starting ProB. Cannot read from input stream.", e, true); } for (CliPattern<?> p : patterns) { p.notFound(); @@ -228,11 +220,9 @@ public final class CliStarter { return new File(resolvedUri); } catch (URISyntaxException e) { - throw new CliException("Unable to construct file '" - + entry.getPath() + "'"); + throw new CliException("Unable to construct file '" + entry.getPath() + "'", e, false); } catch (IOException e2) { - throw new CliException("Input/output error when trying t find '" - + fileURL + "'"); + throw new CliException("Input/output error when trying t find '" + fileURL + "'", e2, false); } } diff --git a/de.prob.core/src/de/prob/cli/clipatterns/PortPattern.java b/de.prob.core/src/de/prob/cli/clipatterns/PortPattern.java index 3878e2cbc7662fb6fbaf5960c56575985f57d2cc..19724b1a772a4da213176fafb3ec610ed545e30f 100644 --- a/de.prob.core/src/de/prob/cli/clipatterns/PortPattern.java +++ b/de.prob.core/src/de/prob/cli/clipatterns/PortPattern.java @@ -39,14 +39,7 @@ public class PortPattern extends CliPattern<Integer> { @Override public void notFound() throws CliException { - // final String message = "Could not determine port of ProB server"; - // Logger.notifyUser(message); - // throw new CliException(message); - - CliException cliException = new CliException( - "Could not determine port of ProB server"); - cliException.notifyUserOnce(); - throw cliException; + throw new CliException("Could not determine port of ProB server"); } } diff --git a/de.prob.core/src/de/prob/core/internal/AnimatorImpl.java b/de.prob.core/src/de/prob/core/internal/AnimatorImpl.java index dff26da09c9f8ec74e7205753be129c9ba7efae6..a14f54bd05f6dbac1a55a8327ff09f04fbff1e52 100644 --- a/de.prob.core/src/de/prob/core/internal/AnimatorImpl.java +++ b/de.prob.core/src/de/prob/core/internal/AnimatorImpl.java @@ -98,8 +98,7 @@ public class AnimatorImpl { try { connector.startup(file); } catch (CliException e) { - // The user has been notified by the underlying implementation, so - // we only invalidate the connector + e.notifyUserOnce(); connector = null; } } diff --git a/de.prob.core/src/de/prob/core/internal/ServerConnection.java b/de.prob.core/src/de/prob/core/internal/ServerConnection.java index 049253f22979ffacaa53d7e957b094a281957bfc..a9c9c43f7277a3491f78a8d95b7ec6e315e1add9 100644 --- a/de.prob.core/src/de/prob/core/internal/ServerConnection.java +++ b/de.prob.core/src/de/prob/core/internal/ServerConnection.java @@ -62,8 +62,7 @@ public class ServerConnection implements IServerConnection { outputStream = null; } } - ProblemHandler.handleCliException( - "Opening connection to ProB server failed", e); + throw new CliException("Opening connection to ProB server failed", e, false); } }