Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-09-14 12:54:49 -0400
committerRyan D. Brooks2010-09-14 12:54:49 -0400
commit74225843949515181df78245bfcb31147a805ba9 (patch)
tree93f998f89457d9df6ef5ace11c6127216d56bb47 /plugins/org.eclipse.osee.ote.ui.message
parentf0f991b4f728f2e7550016da91eb2e8d2c8c750c (diff)
downloadorg.eclipse.osee-74225843949515181df78245bfcb31147a805ba9.tar.gz
org.eclipse.osee-74225843949515181df78245bfcb31147a805ba9.tar.xz
org.eclipse.osee-74225843949515181df78245bfcb31147a805ba9.zip
refactor: Directly support String.format in OseeCoreException constructors
Diffstat (limited to 'plugins/org.eclipse.osee.ote.ui.message')
-rw-r--r--plugins/org.eclipse.osee.ote.ui.message/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.osee.ote.ui.message/src/org/eclipse/osee/ote/ui/message/watch/WatchView.java20
2 files changed, 8 insertions, 15 deletions
diff --git a/plugins/org.eclipse.osee.ote.ui.message/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ote.ui.message/META-INF/MANIFEST.MF
index cfcd3ce2d2..54c7fded29 100644
--- a/plugins/org.eclipse.osee.ote.ui.message/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ote.ui.message/META-INF/MANIFEST.MF
@@ -29,4 +29,5 @@ Export-Package: org.eclipse.osee.ote.ui.message,
org.eclipse.osee.ote.ui.message.view,
org.eclipse.osee.ote.ui.message.watch
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: org.eclipse.osee.framework.core.operation
+Import-Package: org.eclipse.osee.framework.core.exception,
+ org.eclipse.osee.framework.core.operation
diff --git a/plugins/org.eclipse.osee.ote.ui.message/src/org/eclipse/osee/ote/ui/message/watch/WatchView.java b/plugins/org.eclipse.osee.ote.ui.message/src/org/eclipse/osee/ote/ui/message/watch/WatchView.java
index c0d68b92b3..96c2ab84a2 100644
--- a/plugins/org.eclipse.osee.ote.ui.message/src/org/eclipse/osee/ote/ui/message/watch/WatchView.java
+++ b/plugins/org.eclipse.osee.ote.ui.message/src/org/eclipse/osee/ote/ui/message/watch/WatchView.java
@@ -30,7 +30,6 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.InvalidRegistryObjectException;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.Action;
@@ -49,6 +48,7 @@ import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.nebula.widgets.xviewer.XViewer;
import org.eclipse.osee.connection.service.IServiceConnector;
+import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.util.AFile;
import org.eclipse.osee.framework.jdk.core.util.benchmark.Benchmark;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -300,28 +300,20 @@ public final class WatchView extends ViewPart implements IActionable, IMessageDi
if (icon != null) {
URL url = bundle.getEntry(icon);
if (url == null) {
- throw new IllegalArgumentException(String.format("Invalid icon path [{%s}/%s]",
- el.getContributor().getName(), icon));
+ throw new OseeArgumentException("Invalid icon path [{%s}/%s]", el.getContributor().getName(),
+ icon);
} else {
ImageDescriptor desc = ImageDescriptor.createFromURL(url);
Image img = desc.createImage();
if (img == null) {
- throw new IllegalArgumentException(String.format("Unable to create Image from [{%s}/%s]",
- el.getContributor().getName(), icon));
+ throw new OseeArgumentException("Unable to create Image from [{%s}/%s]",
+ el.getContributor().getName(), icon);
} else {
btn.setImage(img);
}
}
}
- } catch (InvalidRegistryObjectException ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- } catch (ClassNotFoundException ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- } catch (InstantiationException ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- } catch (IllegalAccessException ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- } catch (IllegalArgumentException ex) {
+ } catch (Exception ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex);
}
}

Back to the top