Author: tfennelly
Date: 2009-12-04 09:12:02 -0500 (Fri, 04 Dec 2009)
New Revision: 19050
Modified:
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JsonInputDataParser.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5361
Capture and display error message if not able to parse input message to produce input
model
Small tweak to earlier commit from Dart.
Modified:
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java
===================================================================
---
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java 2009-12-04
13:47:36 UTC (rev 19049)
+++
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java 2009-12-04
14:12:02 UTC (rev 19050)
@@ -115,6 +115,7 @@
import org.jboss.tools.smooks.model.smooks.SmooksPackage;
import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
+import org.milyn.SmooksException;
/**
* @author Dart
@@ -1193,8 +1194,11 @@
Throwable t = SelectorCreationDialog.getCurrentException();
if (t != null) {
if (this.getManagedForm() != null) {
+ if(t instanceof SmooksException && t.getCause() != null) {
+ t = t.getCause();
+ }
this.getManagedForm().getMessageManager().addMessage("input error",
- "Input Error : " + t.getMessage(), null, IMessageProvider.ERROR);
+ "Check Reader Configuration. Error creating Input Model from Input
Data.\nError: " + t.getMessage(), null, IMessageProvider.ERROR);
}
}
}
Modified:
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JsonInputDataParser.java
===================================================================
---
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JsonInputDataParser.java 2009-12-04
13:47:36 UTC (rev 19049)
+++
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JsonInputDataParser.java 2009-12-04
14:12:02 UTC (rev 19050)
@@ -201,11 +201,7 @@
// Filter the message through Smooks and capture the result as a DOM in
// the domResult instance...
- try {
- smooks.filterSource(new StreamSource(inputStream), result);
- } catch (Exception t) {
- throw new RuntimeException(t);
- }
+ smooks.filterSource(new StreamSource(inputStream), result);
XMLObjectAnalyzer analyzer = new XMLObjectAnalyzer();
ByteArrayInputStream byteinputStream = new
ByteArrayInputStream(result.getResult().getBytes());