[Swift-commit] r6385 - branches/release-0.94/src/org/griphyn/vdl/mapping
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Sat Mar 16 17:48:12 CDT 2013
Author: hategan
Date: 2013-03-16 17:48:10 -0500 (Sat, 16 Mar 2013)
New Revision: 6385
Added:
branches/release-0.94/src/org/griphyn/vdl/mapping/MappingException.java
Modified:
branches/release-0.94/src/org/griphyn/vdl/mapping/AbstractDataNode.java
branches/release-0.94/src/org/griphyn/vdl/mapping/DataDependentException.java
branches/release-0.94/src/org/griphyn/vdl/mapping/DependentException.java
branches/release-0.94/src/org/griphyn/vdl/mapping/MappingDependentException.java
branches/release-0.94/src/org/griphyn/vdl/mapping/RootArrayDataNode.java
branches/release-0.94/src/org/griphyn/vdl/mapping/RootDataNode.java
Log:
fixed mapping errors not being reported and causing a hang (bug 967)
Modified: branches/release-0.94/src/org/griphyn/vdl/mapping/AbstractDataNode.java
===================================================================
--- branches/release-0.94/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2013-03-15 21:53:56 UTC (rev 6384)
+++ branches/release-0.94/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2013-03-16 22:48:10 UTC (rev 6385)
@@ -29,7 +29,6 @@
import java.util.Map;
import org.apache.log4j.Logger;
-import org.globus.cog.karajan.workflow.ExecutionException;
import org.globus.cog.karajan.workflow.futures.Future;
import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable;
import org.griphyn.vdl.karajan.DSHandleFutureWrapper;
Modified: branches/release-0.94/src/org/griphyn/vdl/mapping/DataDependentException.java
===================================================================
--- branches/release-0.94/src/org/griphyn/vdl/mapping/DataDependentException.java 2013-03-15 21:53:56 UTC (rev 6384)
+++ branches/release-0.94/src/org/griphyn/vdl/mapping/DataDependentException.java 2013-03-16 22:48:10 UTC (rev 6385)
@@ -35,7 +35,7 @@
}
public String getMessage() {
- return getVariableName() + " not derived due to errors in data dependencies";
+ return getVariableInfo() + " not derived due to errors in data dependencies";
}
}
Modified: branches/release-0.94/src/org/griphyn/vdl/mapping/DependentException.java
===================================================================
--- branches/release-0.94/src/org/griphyn/vdl/mapping/DependentException.java 2013-03-15 21:53:56 UTC (rev 6384)
+++ branches/release-0.94/src/org/griphyn/vdl/mapping/DependentException.java 2013-03-16 22:48:10 UTC (rev 6385)
@@ -50,6 +50,16 @@
return handle.toString();
}
}
+
+ public String getVariableInfo() {
+ if (handle instanceof AbstractDataNode) {
+ AbstractDataNode n = (AbstractDataNode) handle;
+ return n.getDisplayableName() + ", line " + n.getDeclarationLine();
+ }
+ else {
+ return handle.toString();
+ }
+ }
public String toString() {
return getMessage();
Modified: branches/release-0.94/src/org/griphyn/vdl/mapping/MappingDependentException.java
===================================================================
--- branches/release-0.94/src/org/griphyn/vdl/mapping/MappingDependentException.java 2013-03-15 21:53:56 UTC (rev 6384)
+++ branches/release-0.94/src/org/griphyn/vdl/mapping/MappingDependentException.java 2013-03-16 22:48:10 UTC (rev 6385)
@@ -35,6 +35,6 @@
}
public String getMessage() {
- return getHandle() + " not mapped due to error in mapping dependencies";
+ return getVariableInfo() + " not mapped due to error in mapping dependencies";
}
}
Added: branches/release-0.94/src/org/griphyn/vdl/mapping/MappingException.java
===================================================================
--- branches/release-0.94/src/org/griphyn/vdl/mapping/MappingException.java (rev 0)
+++ branches/release-0.94/src/org/griphyn/vdl/mapping/MappingException.java 2013-03-16 22:48:10 UTC (rev 6385)
@@ -0,0 +1,27 @@
+//----------------------------------------------------------------------
+//This code is developed as part of the Java CoG Kit project
+//The terms of the license can be found at http://www.cogkit.org/license
+//This message may not be removed or altered.
+//----------------------------------------------------------------------
+
+/*
+ * Created on Mar 16, 2013
+ */
+package org.griphyn.vdl.mapping;
+
+public class MappingException extends DependentException {
+
+ public MappingException(DSHandle handle, Exception prev) {
+ super(handle, prev);
+ }
+
+ public MappingException(DSHandle handle) {
+ super(handle);
+ }
+
+ @Override
+ public String getMessage() {
+ return getVariableInfo() + " had mapping errors";
+ }
+
+}
Modified: branches/release-0.94/src/org/griphyn/vdl/mapping/RootArrayDataNode.java
===================================================================
--- branches/release-0.94/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2013-03-15 21:53:56 UTC (rev 6384)
+++ branches/release-0.94/src/org/griphyn/vdl/mapping/RootArrayDataNode.java 2013-03-16 22:48:10 UTC (rev 6385)
@@ -105,12 +105,16 @@
}
catch (DependentException e) {
setValue(new MappingDependentException(this, e));
- closeShallow();
}
}
- public void futureModified(Future f, VariableStack stack) {
- innerInit();
+ public void futureModified(Future f, VariableStack stack) {
+ try {
+ innerInit();
+ }
+ catch (Exception e) {
+ this.setValue(new MappingException(this, e));
+ }
}
public String getParam(MappingParam p) {
Modified: branches/release-0.94/src/org/griphyn/vdl/mapping/RootDataNode.java
===================================================================
--- branches/release-0.94/src/org/griphyn/vdl/mapping/RootDataNode.java 2013-03-15 21:53:56 UTC (rev 6384)
+++ branches/release-0.94/src/org/griphyn/vdl/mapping/RootDataNode.java 2013-03-16 22:48:10 UTC (rev 6385)
@@ -108,13 +108,16 @@
}
catch (DependentException e) {
setValue(new MappingDependentException(this, e));
- closeShallow();
- return;
}
}
public void futureModified(Future f, VariableStack stack) {
- innerInit();
+ try {
+ innerInit();
+ }
+ catch (Exception e) {
+ this.setValue(new MappingException(this, e));
+ }
}
More information about the Swift-commit
mailing list