Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-11-02 17:40:20 -0400
committerPascal Rapicault2010-11-02 17:40:20 -0400
commitb950136a679ad621fda3a3bf4d7e1e89b1f5a5e4 (patch)
treee1008ba5790fc9bb324a30061e6a70b095a4fa92
parent37935ed0934f3a9b32fe8bcdf5ba15b7e256927f (diff)
downloadrt.equinox.p2-b950136a679ad621fda3a3bf4d7e1e89b1f5a5e4.tar.gz
rt.equinox.p2-b950136a679ad621fda3a3bf4d7e1e89b1f5a5e4.tar.xz
rt.equinox.p2-b950136a679ad621fda3a3bf4d7e1e89b1f5a5e4.zip
Bug 321997 - P2 Publisher applications hide the exception which caused the ERROR result status
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java12
3 files changed, 15 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java
index 1f74107d7..69287e4b1 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java
@@ -31,6 +31,8 @@ public class Messages extends NLS {
public static String message_generatingMetadata;
public static String message_generationCompleted;
public static String message_noSimpleconfigurator;
+ public static String message_resultException;
+ public static String message_publisherArguments;
public static String exception_artifactRepoNoAppendDestroysInput;
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties
index 80a800881..d7be89b26 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties
@@ -24,6 +24,8 @@ exception_sourcePath=Source location ({0}) must be a valid file-system path.
message_generatingMetadata = Generating metadata for {0}.
message_generationCompleted = Generation completed with success [{0} seconds].
message_noSimpleconfigurator = Could not find simpleconfigurator bundle.
+message_resultException=Product publishing ended with the following exception:
+message_publisherArguments=Product publisher application was executed with the following arguments:
exception_artifactRepoNoAppendDestroysInput = Not appending to artifact repository ({0}) may destroy input files.
error_rootIU_generation = Could not generate root IU {0}, {1}, {2}..
exception_errorLoadingProductFile = An error has occurred while loading product file {0}. Exception details: {1}. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
index 418de4492..6e3385e33 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
@@ -251,9 +251,11 @@ public abstract class AbstractPublisherApplication implements IApplication {
info = createPublisherInfo();
processCommandLineArguments(args, info);
Object result = run(info);
- if (result != IApplication.EXIT_OK)
+ if (result != IApplication.EXIT_OK) {
+ System.out.println(NLS.bind(Messages.message_publisherArguments, null));
for (int i = 0; i < args.length; i++)
System.out.println(args[i]);
+ }
return result;
} catch (Exception e) {
if (e.getMessage() != null)
@@ -285,7 +287,15 @@ public abstract class AbstractPublisherApplication implements IApplication {
System.out.println(NLS.bind(Messages.message_generationCompleted, String.valueOf((after - before) / 1000)));
return IApplication.EXIT_OK;
}
+ // TODO: improve the string representation of the result
System.out.println(result);
+ Throwable th = result.getException();
+ if (th != null) {
+ System.out.println();
+ System.out.println(NLS.bind(Messages.message_resultException, null));
+ th.printStackTrace(System.out);
+ System.out.println();
+ }
} catch (ProvisionException e) {
status = e.getStatus();
if (status.getSeverity() == IStatus.ERROR && status.getMessage() != null) {

Back to the top