diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2012-08-03 13:59:56 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2012-08-03 13:59:56 +0200 |
| commit | 4058f36268d4233ae755f7de2ed16c893f649ffa (patch) | |
| tree | 45237500e7979c827ada65a7cc9129718ddc39c1 /src/main/java/com/c2kernel/lifecycle/instance | |
| parent | c9b9cea6d6c59107ab3a6a67a81e8e3862b41fce (diff) | |
Logging and error message clean-up
Logger.debug(String) now deprecated so they're easier to spot when left
in.
Diffstat (limited to 'src/main/java/com/c2kernel/lifecycle/instance')
3 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/JobPusher.java b/src/main/java/com/c2kernel/lifecycle/instance/JobPusher.java index 27af6b4..190758a 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/JobPusher.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/JobPusher.java @@ -50,7 +50,7 @@ final class JobPusher extends Thread { // push it to the agent
org.omg.CORBA.Object agentIOR = nextAgent.getIOR();
Agent thisAgent = AgentHelper.narrow(agentIOR);
- Logger.debug("Calling agent "+thisAgent.getSystemKey()+" from "+activity.getPath());
+ Logger.msg(7, "Calling agent "+thisAgent.getSystemKey()+" from "+activity.getPath());
thisAgent.refreshJobList(this.activity.getItemEntityPath().getSysKey(), activity.getPath(), stringJobs);
}
catch (Exception ex)
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java b/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java index f6cec33..b1e2211 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/WfVertex.java @@ -152,6 +152,10 @@ public abstract class WfVertex extends GraphableVertex private static Script getScript(String name, String version) throws ScriptingEngineException
{
+ if (name == null || name.length() == 0)
+ throw new ScriptingEngineException("Script name is empty");
+ if (version == null || version.length() == 0)
+ throw new ScriptingEngineException("Script version is empty");
Script script;
try
{
@@ -165,7 +169,7 @@ public abstract class WfVertex extends GraphableVertex script = new Script(name.substring(0, split), name.substring(split + 1));
}
else
- throw new ScriptingEngineException("Could not find script " + name + " v" + version);
+ throw new ScriptingEngineException("Could not find script '" + name + "' version '" + version+"'");
}
return script;
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/predefined/entitycreation/Dependency.java b/src/main/java/com/c2kernel/lifecycle/instance/predefined/entitycreation/Dependency.java index 9cb3894..b3be9d1 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/predefined/entitycreation/Dependency.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/predefined/entitycreation/Dependency.java @@ -10,7 +10,6 @@ import com.c2kernel.property.PropertyDescriptionList; import com.c2kernel.property.PropertyUtility;
import com.c2kernel.utils.CastorHashMap;
import com.c2kernel.utils.KeyValuePair;
-import com.c2kernel.utils.Logger;
public class Dependency implements java.io.Serializable {
@@ -43,7 +42,6 @@ public class Dependency implements java.io.Serializable { public com.c2kernel.collection.Dependency create() throws MembershipException, ObjectNotFoundException {
com.c2kernel.collection.Dependency newDep = isDescription?new com.c2kernel.collection.DependencyDescription(name):new com.c2kernel.collection.Dependency(name);
if (itemDescriptionPath != null && itemDescriptionPath.length()>0) {
- Logger.debug(itemDescriptionPath);
PropertyDescriptionList propList = PropertyUtility.getPropertyDescriptionOutcome(new DomainPath(itemDescriptionPath).getSysKey());
StringBuffer classProps = new StringBuffer();
for (PropertyDescription pd : propList.list) {
|
