Skip to content

Commit 4fd5554

Browse files
author
Jörg Kubitz
committed
Remove stacktrace from DataFormatException but add raw value #2521
looks less scary #2521
1 parent 323f82d commit 4fd5554

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/themes/ColorDefinition.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
package org.eclipse.ui.internal.themes;
1515

1616
import org.eclipse.core.runtime.IStatus;
17+
import org.eclipse.core.runtime.Status;
1718
import org.eclipse.e4.ui.internal.css.swt.definition.IColorDefinitionOverridable;
1819
import org.eclipse.jface.resource.DataFormatException;
1920
import org.eclipse.swt.graphics.RGB;
2021
import org.eclipse.ui.IPluginContribution;
21-
import org.eclipse.ui.internal.misc.StatusUtil;
2222
import org.eclipse.ui.statushandlers.StatusManager;
2323
import org.eclipse.ui.themes.ColorUtil;
2424

@@ -111,8 +111,8 @@ public RGB getValue() {
111111
parsedValue = ColorUtil.getColorValue(rawValue);
112112
} catch (DataFormatException e) {
113113
parsedValue = DEFAULT_COLOR_VALUE;
114-
IStatus status = StatusUtil.newStatus(IStatus.WARNING,
115-
"Could not parse value for theme color " + getId(), e); //$NON-NLS-1$
114+
IStatus status = Status
115+
.warning("Could not parse value for theme color " + getId() + ": \"" + rawValue + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
116116
StatusManager.getManager().handle(status, StatusManager.LOG);
117117
}
118118
}

tests/org.eclipse.ui.tests/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2621,7 +2621,7 @@
26212621
</colorDefinition>
26222622
<colorDefinition
26232623
label="badColor3"
2624-
value="0,0, 1x"
2624+
value="0,0, 1IntentionalBadColor3inorg.eclipse.ui.tests/plugin.xml"
26252625
id="badColor3">
26262626
</colorDefinition>
26272627
<fontDefinition

0 commit comments

Comments
 (0)