Commit 26cb0f59 authored by Alexander Diewald's avatar Alexander Diewald

CLI-Prj-Imp: Improve Error Reporting

Issue-Ref: 3993
Issue-Url: https://af3-developer.fortiss.org/issues/3993Signed-off-by: default avatarAlexander Diewald <diewal@fortiss.org>
parent 9d1526f2
AF3ProjectImportHandler.java 95af1f2d92bd41d88940d5b074561e0e7c789238 YELLOW
AF3ProjectImportHandler.java bc30c87f89ec3301ec98de4bc3310eb529b874a4 YELLOW
......@@ -60,8 +60,9 @@ public class AF3ProjectImportHandler implements ICommandLineSwitchHandler {
try {
tryImportProjects(argument);
} catch(IOException e) {
error(AF3ProjectActivator.getDefault(),
"Could not import one or more of the given AF3 projects.");
String impErr = "Could not import one or more of the given AF3 projects.";
error(AF3ProjectActivator.getDefault(), impErr, e);
System.out.println(impErr + "\n\n" + e.getMessage());
}
}
......@@ -120,6 +121,8 @@ public class AF3ProjectImportHandler implements ICommandLineSwitchHandler {
String errMsg = "The import failed because some equivalently named projects already" +
" exist in the workspace. The following duplicates were detected:\n";
errMsg += alreadyExistingProjects.stream().collect(joining("\n"));
errMsg += "\nYou can either pass a new workspace location with the switch " +
"\"-data <path-to-ws>\" or clean the existing workspace.";
throw new IOException(errMsg);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment