Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2009-07-09 11:17:43 -0400
committerashatalin2009-07-09 11:17:43 -0400
commita8671018e2ac72f2096bc83fd1bada8e0d06c810 (patch)
tree7bb8946be1c611988a3be91ec156f9e4a3ab89ff
parent8005513809cf45b3984c232578f5bfc1db3b6488 (diff)
downloadorg.eclipse.gmf-tooling-a8671018e2ac72f2096bc83fd1bada8e0d06c810.tar.gz
org.eclipse.gmf-tooling-a8671018e2ac72f2096bc83fd1bada8e0d06c810.tar.xz
org.eclipse.gmf-tooling-a8671018e2ac72f2096bc83fd1bada8e0d06c810.zip
[270955] - TransformToGenModelWizard: show correct message from InvocationTargetExceptionv20090709-1925
-rw-r--r--plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelOperation.java8
-rw-r--r--plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelWizard.java13
2 files changed, 12 insertions, 9 deletions
diff --git a/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelOperation.java b/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelOperation.java
index de5367f82..707ee724a 100644
--- a/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelOperation.java
+++ b/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelOperation.java
@@ -298,18 +298,12 @@ public class TransformToGenModelOperation {
return Status.OK_STATUS;
} catch (CoreException ex) {
return ex.getStatus();
- } catch (IOException ex) {
+ } catch (Exception ex) {
String message = ex.getMessage();
if (message == null) {
message = Messages.TransformToGenModelOperation_e_generator_creation;
}
return Plugin.createError(message, ex);
- } catch (Error err) {
- Plugin.log(Plugin.createError(err.getMessage(), err));
- throw err;
- } catch (RuntimeException ex) {
- Plugin.log(ex);
- throw ex;
} finally {
setGMFGenValidationResult(validation);
if (monitor != null) {
diff --git a/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelWizard.java b/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelWizard.java
index b9b16e501..3ded60ee5 100644
--- a/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelWizard.java
+++ b/plugins/org.eclipse.gmf.bridge.ui/src/org/eclipse/gmf/internal/bridge/transform/TransformToGenModelWizard.java
@@ -23,6 +23,7 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.gmf.internal.bridge.ui.Plugin;
import org.eclipse.gmf.internal.bridge.wizards.WizardUtil;
import org.eclipse.gmf.internal.common.URIUtil;
import org.eclipse.gmf.internal.common.ui.ResourceLocationProvider;
@@ -165,14 +166,22 @@ public class TransformToGenModelWizard extends Wizard implements IWorkbenchWizar
return processGMFGenValidationResult();
}
setErrorMessage(s[0].getMessage());
+ if (s[0].getException() != null) {
+ Plugin.log(s[0]);
+ }
return false;
} catch (InvocationTargetException ex) {
String message = Messages.TransformToGenModelOperation_e_generator_creation;
Throwable targetException = ex.getTargetException();
- if (targetException != null && targetException.getMessage() != null) {
- message = targetException.getMessage();
+ if (targetException != null) {
+ if (targetException.getMessage() != null) {
+ message = targetException.getMessage();
+ } else {
+ message += ": " + targetException.getClass().getName();
+ }
}
setErrorMessage(message);
+ Plugin.log(Plugin.createError(message, targetException));
return false;
} catch (InterruptedException ex){
setErrorMessage(Messages.TransformToGenModelWizard_e_operation_cancelled);

Back to the top