diff options
author | Eike Stepper | 2015-05-05 10:43:37 +0000 |
---|---|---|
committer | Pascal Rapicault | 2016-01-02 21:37:54 +0000 |
commit | 2608885d67a3a99406a8cf1bc660241c3574dcfa (patch) | |
tree | eede74565ebabede00dc799b91b5ef2ed20cd45d /bundles/org.eclipse.equinox.p2.metadata | |
parent | d9057d09f6b96fd8b9988299d3eb5131f9a79a98 (diff) | |
download | rt.equinox.p2-2608885d67a3a99406a8cf1bc660241c3574dcfa.tar.gz rt.equinox.p2-2608885d67a3a99406a8cf1bc660241c3574dcfa.tar.xz rt.equinox.p2-2608885d67a3a99406a8cf1bc660241c3574dcfa.zip |
Bug 466249 - Propagate more exceptions to ease problem analysis
We often get problem reports with stack traces that "end" somewhere in
p2 even though it's obvious from looking at these places that there was
a causing exception. These causing exceptions are often not propagated
with the new exception that p2 creates and throws. I'm not sure if
that's on purpose or just an oversight. I've prepared a proposal to
enhance these places and make it easier to analyze the problems that
users report.
Change-Id: Iaa53448c53c18301113b42dbe80558eccec49e8e
Signed-off-by: Eike Stepper <stepper@esc-net.de>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.metadata')
3 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java index 9b46f07ac..3b71bec6d 100644 --- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java +++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java @@ -150,7 +150,7 @@ public abstract class VersionParser { fmt = VersionFormat.compile(version, pos, end); pos = end + 1; } catch (VersionFormatException e) { - throw new IllegalArgumentException(e.getMessage()); + throw new IllegalArgumentException(e.getMessage(), e); } if (pos == maxPos) { // This was a raw version with format but no original diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java index ddef52293..87e9bfee1 100644 --- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java +++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java @@ -29,7 +29,7 @@ public final class ClassFunction extends Function { try { return Class.forName((String) arg); } catch (ClassNotFoundException e) { - throw new IllegalArgumentException(e.getMessage()); + throw new IllegalArgumentException(e.getMessage(), e); } } diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java index 1dc0b1039..34d3d81b5 100644 --- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java +++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java @@ -263,7 +263,7 @@ public class VersionRange implements Serializable { position[0] = end + 1; return VersionFormat.compile(versionRange, pos, end); } catch (VersionFormatException e) { - throw new IllegalArgumentException(e.getMessage()); + throw new IllegalArgumentException(e.getMessage(), e); } } |