Skip to Content.
Sympa Menu

notify-dpml - r1527 - trunk/main/metro/tools/src/main/net/dpml/metro/tools

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1527 - trunk/main/metro/tools/src/main/net/dpml/metro/tools
  • Date: Fri, 23 Jun 2006 09:06:50 +0200

Author: mcconnell
Date: 2006-06-23 09:06:48 +0200 (Fri, 23 Jun 2006)
New Revision: 1527

Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateDataType.java
Log:
update state graph datatype to handle bad resource references

Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateDataType.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateDataType.java
2006-06-23 04:57:37 UTC (rev 1526)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateDataType.java
2006-06-23 07:06:48 UTC (rev 1527)
@@ -269,7 +269,7 @@
{
if( null != m_uri )
{
- m_task.log( "importing state graph: " + m_uri );
+ m_task.log( "importing state graph: " + m_uri,
Project.MSG_VERBOSE );
try
{
return STATE_DECODER.loadState( m_uri );
@@ -285,6 +285,7 @@
}
else if( null != m_classname )
{
+ m_task.log( "loading state from resource: " + m_classname,
Project.MSG_VERBOSE );
try
{
ClassLoader classloader = createClassLoader();
@@ -296,12 +297,12 @@
final String error =
"Unable to load an embedded state xgraph from the
resource: "
+ m_classname + ".xgraph";
- throw new BuildException( error, e );
+ throw new BuildException( error, e, m_task.getLocation() );
}
}
else
{
- m_task.log( "creating embedded state graph" );
+ m_task.log( "creating embedded state graph", Project.MSG_VERBOSE
);
String name = getStateName();
Trigger[] triggers = getTriggers();
Operation[] operations = getOperations();
@@ -406,7 +407,9 @@
URL url = subject.getClassLoader().getResource( resource );
if( null == url )
{
- return null;
+ final String error =
+ "The requested state graph resource [" + resource + "]
does not exist.";
+ throw new BuildException( error, m_task.getLocation() );
}
else
{




  • r1527 - trunk/main/metro/tools/src/main/net/dpml/metro/tools, mcconnell at BerliOS, 06/23/2006

Archive powered by MHonArc 2.6.24.

Top of Page