Bob et al.

Here is a patch for the blissed taglib.  I also
noticed that your jelly unit test script was a little
out of date, so I fixed that too; I think James
tweaked the format of some Exception messages
recently.  Note that you need to add the jelly junit
tags to your dependencies, since they are no longer in
core.

Also I made a minor gaffe with this patch and the
drools patch.  I'm using a new editor, and I
accidentally used tabs instead of spaces in some of
the classes.  I recommend running the patched files
through your favorite formatter before committing, or
if you prefer, let me know when you've committed the
patches and I'll provide a follow-up patch fixing the
tabs.

- Morgan

=====
Morgan Delagrange
http://jakarta.apache.org/taglibs
http://jakarta.apache.org/commons
http://axion.tigris.org
http://jakarta.apache.org/watchdog

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Index: src/java/main/com/werken/blissed/jelly/ActivityTag.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/ActivityTag.java,v
retrieving revision 1.11
diff -u -r1.11 ActivityTag.java
--- src/java/main/com/werken/blissed/jelly/ActivityTag.java     18 Sep 2002 15:49:17 
-0000      1.11
+++ src/java/main/com/werken/blissed/jelly/ActivityTag.java     30 Jan 2003 01:40:14 
+-0000
@@ -52,7 +52,7 @@
 
 import org.apache.commons.jelly.Script;
 import org.apache.commons.jelly.XMLOutput;
-import org.apache.commons.jelly.JellyException;
+import org.apache.commons.jelly.JellyTagException;
 
 /** Create an activity.
  *
@@ -111,9 +111,9 @@
      *
      *  @param output The output sink.
      *
-     *  @throws Exception if an error occurs.
+     *  @throws JellyTagException if an error occurs.
      */
-    public void doTag(XMLOutput output) throws Exception
+    public void doTag(XMLOutput output) throws JellyTagException
     {
         State state = null;
 
@@ -121,7 +121,7 @@
         {     
             state = getCurrentState();
         }
-        catch (JellyException e)
+        catch (JellyTagException e)
         {
             // ignore
         }
@@ -132,9 +132,9 @@
                  &&
                  ! ( state.getActivity() instanceof NoOpActivity ) )
             {
-                throw new JellyException( "Activity already defined for state \""
-                                          + state.getName()
-                                          + "\"" );
+                throw new JellyTagException( "Activity already defined for state \""
+                                             + state.getName()
+                                             + "\"" );
             }
         }
 
Index: src/java/main/com/werken/blissed/jelly/BlissedTag.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/BlissedTag.java,v
retrieving revision 1.8
diff -u -r1.8 BlissedTag.java
--- src/java/main/com/werken/blissed/jelly/BlissedTag.java      18 Sep 2002 06:04:44 
-0000      1.8
+++ src/java/main/com/werken/blissed/jelly/BlissedTag.java      30 Jan 2003 01:40:14 
+-0000
@@ -46,6 +46,7 @@
  
  */
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 
 /** Outtermost wrapper tag to denote a block of blissed.
@@ -78,9 +79,9 @@
      *
      *  @param output The output sink.
      *
-     *  @throws Exception if an error occurs.
+     *  @throws JellyTagException if an error occurs.
      */
-    public void doTag(XMLOutput output) throws Exception
+    public void doTag(XMLOutput output) throws JellyTagException
     {
         invokeBody( output );
     }
Index: src/java/main/com/werken/blissed/jelly/CallTag.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/CallTag.java,v
retrieving revision 1.7
diff -u -r1.7 CallTag.java
--- src/java/main/com/werken/blissed/jelly/CallTag.java 18 Sep 2002 06:04:44 -0000     
 1.7
+++ src/java/main/com/werken/blissed/jelly/CallTag.java 30 Jan 2003 01:40:14 -0000
@@ -46,12 +46,14 @@
  
  */
 
+import com.werken.blissed.ActivityException;
+import com.werken.blissed.InvalidMotionException;
 import com.werken.blissed.Process;
 import com.werken.blissed.ProcessEngine;
 import com.werken.blissed.ProcessContext;
 
 import org.apache.commons.jelly.XMLOutput;
-import org.apache.commons.jelly.JellyException;
+import org.apache.commons.jelly.JellyTagException;
 
 /** Call a process.
  *
@@ -115,7 +117,7 @@
      *
      *  @throws Exception if an error occurs.
      */
-    public void doTag(XMLOutput output) throws Exception
+    public void doTag(XMLOutput output) throws JellyTagException
     {
         checkObjectAttribute( "process",
                               getProcess() );
@@ -124,12 +126,23 @@
 
         if ( context == null )
         {
-            throw new JellyException( "No process context" );
+            throw new JellyTagException( "No process context" );
         }
         ProcessEngine  engine  = context.getProcessEngine();
 
-        engine.call( getProcess(),
-                     context );
+        try 
+        {
+            engine.call( getProcess(),
+                         context );
+        }
+        catch (ActivityException e)
+        {
+               throw new JellyTagException( e );
+        }
+        catch (InvalidMotionException e) 
+        {
+               throw new JellyTagException( e );
+        }
     }
 }
 
Index: src/java/main/com/werken/blissed/jelly/DefinitionTagSupport.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/DefinitionTagSupport.java,v
retrieving revision 1.3
diff -u -r1.3 DefinitionTagSupport.java
--- src/java/main/com/werken/blissed/jelly/DefinitionTagSupport.java    17 Sep 2002 
23:00:05 -0000      1.3
+++ src/java/main/com/werken/blissed/jelly/DefinitionTagSupport.java    30 Jan 2003 
+01:40:14 -0000
@@ -50,7 +50,7 @@
 import com.werken.blissed.Process;
 import com.werken.blissed.State;
 
-import org.apache.commons.jelly.JellyException;
+import org.apache.commons.jelly.JellyTagException;
 
 /** Base of process definition jelly tags.
  *
@@ -81,13 +81,13 @@
      *
      *  @throws JellyException If an in-scope process does not exist.
      */
-    protected Process getCurrentProcess() throws JellyException
+    protected Process getCurrentProcess() throws JellyTagException
     {
         ProcessTag processTag = (ProcessTag) findAncestorWithClass( ProcessTag.class 
);
 
         if ( processTag == null )
         {
-            throw new JellyException( "Not within a process element" );
+            throw new JellyTagException( "Not within a process element" );
         }
         
         Process process = processTag.getProcess();
@@ -101,13 +101,13 @@
      *
      *  @throws JellyException If an in-scope state does not exist.
      */
-    protected State getCurrentState() throws JellyException
+    protected State getCurrentState() throws JellyTagException
     {
         StateTag stateTag = (StateTag) findAncestorWithClass( StateTag.class );
 
         if ( stateTag == null )
         {
-            throw new JellyException( "Not within a state element" );
+            throw new JellyTagException( "Not within a state element" );
         }
         
         State state = stateTag.getState();
@@ -121,13 +121,13 @@
      *
      *  @throws JellyException If an in-scope described object does not exist.
      */
-    protected Described getCurrentDescribed() throws JellyException
+    protected Described getCurrentDescribed() throws JellyTagException
     {
         DescribedTag describedTag = (DescribedTag) findAncestorWithClass( 
DescribedTag.class );
 
         if ( describedTag == null )
         {
-            throw new JellyException( "Unable to locate an element to describe" );
+            throw new JellyTagException( "Unable to locate an element to describe" );
         }
 
         Described described = describedTag.getDescribed();
Index: src/java/main/com/werken/blissed/jelly/DescriptionTag.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/DescriptionTag.java,v
retrieving revision 1.4
diff -u -r1.4 DescriptionTag.java
--- src/java/main/com/werken/blissed/jelly/DescriptionTag.java  17 Sep 2002 23:00:05 
-0000      1.4
+++ src/java/main/com/werken/blissed/jelly/DescriptionTag.java  30 Jan 2003 01:40:14 
+-0000
@@ -48,6 +48,7 @@
 
 import com.werken.blissed.Described;
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 
 /** Provide a long description.
@@ -80,9 +81,9 @@
      *
      *  @param output The output sink.
      *
-     *  @throws Exception if an error occurs.
+     *  @throws JellyTagException if an error occurs.
      */
-    public void doTag(XMLOutput output) throws Exception
+    public void doTag(XMLOutput output) throws JellyTagException
     {
         Described described = getCurrentDescribed();
 
Index: src/java/main/com/werken/blissed/jelly/EngineTag.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/EngineTag.java,v
retrieving revision 1.2
diff -u -r1.2 EngineTag.java
--- src/java/main/com/werken/blissed/jelly/EngineTag.java       17 Sep 2002 23:00:05 
-0000      1.2
+++ src/java/main/com/werken/blissed/jelly/EngineTag.java       30 Jan 2003 01:40:14 
+-0000
@@ -48,6 +48,7 @@
 
 import com.werken.blissed.ProcessEngine;
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 
 /** Create a new blissed <code>ProcessEngine</code>.
@@ -109,7 +110,7 @@
      *
      *  @throws Exception if an error occurs.
      */
-    public void doTag(XMLOutput output) throws Exception
+    public void doTag(XMLOutput output) throws JellyTagException
     {
         checkStringAttribute( "var",
                               getVar() );
Index: src/java/main/com/werken/blissed/jelly/FailException.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/FailException.java,v
retrieving revision 1.3
diff -u -r1.3 FailException.java
--- src/java/main/com/werken/blissed/jelly/FailException.java   18 Jul 2002 18:32:58 
-0000      1.3
+++ src/java/main/com/werken/blissed/jelly/FailException.java   30 Jan 2003 01:40:14 
+-0000
@@ -46,7 +46,7 @@
  
  */
 
-import org.apache.commons.jelly.JellyException;
+import org.apache.commons.jelly.JellyTagException;
 
 /** Indicates the immediate failure of a guard.
  *
@@ -55,7 +55,7 @@
  *
  *  @author <a href="mailto:[EMAIL PROTECTED]";>bob mcwhirter</a>
  */
-class FailException extends JellyException
+class FailException extends JellyTagException
 {
 
 }
Index: src/java/main/com/werken/blissed/jelly/FailTag.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/FailTag.java,v
retrieving revision 1.4
diff -u -r1.4 FailTag.java
--- src/java/main/com/werken/blissed/jelly/FailTag.java 17 Sep 2002 23:00:05 -0000     
 1.4
+++ src/java/main/com/werken/blissed/jelly/FailTag.java 30 Jan 2003 01:40:14 -0000
@@ -45,7 +45,7 @@
  OF THE POSSIBILITY OF SUCH DAMAGE.
  
  */
-
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 import org.apache.commons.jelly.TagSupport;
 
@@ -81,9 +81,9 @@
      *
      *  @param output The output sink.
      *
-     *  @throws Exception if an error occurs.
+     *  @throws FailException upon invocation.
      */
-    public void doTag(XMLOutput output) throws Exception
+    public void doTag(XMLOutput output) throws FailException
     {
         throw new FailException();
     }
Index: src/java/main/com/werken/blissed/jelly/GuardTag.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/GuardTag.java,v
retrieving revision 1.8
diff -u -r1.8 GuardTag.java
--- src/java/main/com/werken/blissed/jelly/GuardTag.java        17 Sep 2002 23:00:05 
-0000      1.8
+++ src/java/main/com/werken/blissed/jelly/GuardTag.java        30 Jan 2003 01:40:14 
+-0000
@@ -51,7 +51,7 @@
 
 import org.apache.commons.jelly.Script;
 import org.apache.commons.jelly.XMLOutput;
-import org.apache.commons.jelly.JellyException;
+import org.apache.commons.jelly.JellyTagException;
 
 /** Create a Guard
  *
@@ -110,9 +110,9 @@
      *
      *  @param output The output sink.
      *
-     *  @throws Exception if an error occurs.
+     *  @throws JellyTagException if an error occurs.
      */
-    public void doTag(final XMLOutput output) throws Exception
+    public void doTag(final XMLOutput output) throws JellyTagException
     {
         Script script = getBody();
         
@@ -135,7 +135,7 @@
 
         if ( transition.getGuard() != null )
         {
-            throw new JellyException( "Guard already defined for transition" );
+            throw new JellyTagException( "Guard already defined for transition" );
         }
 
         transition.setGuard( guard );
Index: src/java/main/com/werken/blissed/jelly/PassException.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/PassException.java,v
retrieving revision 1.3
diff -u -r1.3 PassException.java
--- src/java/main/com/werken/blissed/jelly/PassException.java   18 Jul 2002 18:32:58 
-0000      1.3
+++ src/java/main/com/werken/blissed/jelly/PassException.java   30 Jan 2003 01:40:14 
+-0000
@@ -46,7 +46,7 @@
  
  */
 
-import org.apache.commons.jelly.JellyException;
+import org.apache.commons.jelly.JellyTagException;
 
 /** Indicates the immediate passage of a guard.
  *
@@ -55,7 +55,7 @@
  *
  *  @author <a href="mailto:[EMAIL PROTECTED]";>bob mcwhirter</a>
  */
-class PassException extends JellyException
+class PassException extends JellyTagException
 {
 
 }
Index: src/java/main/com/werken/blissed/jelly/PassTag.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/PassTag.java,v
retrieving revision 1.5
diff -u -r1.5 PassTag.java
--- src/java/main/com/werken/blissed/jelly/PassTag.java 17 Sep 2002 23:00:05 -0000     
 1.5
+++ src/java/main/com/werken/blissed/jelly/PassTag.java 30 Jan 2003 01:40:14 -0000
@@ -46,6 +46,7 @@
  
  */
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 import org.apache.commons.jelly.TagSupport;
 
@@ -81,9 +82,9 @@
      *
      *  @param output The output sink.
      *
-     *  @throws Exception if an error occurs.
+     *  @throws PassException upon invocation.
      */
-    public void doTag(XMLOutput output) throws Exception
+    public void doTag(XMLOutput output) throws PassException
     {
         throw new PassException();
     }
Index: src/java/main/com/werken/blissed/jelly/ProcessTag.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/ProcessTag.java,v
retrieving revision 1.12
diff -u -r1.12 ProcessTag.java
--- src/java/main/com/werken/blissed/jelly/ProcessTag.java      17 Sep 2002 23:00:05 
-0000      1.12
+++ src/java/main/com/werken/blissed/jelly/ProcessTag.java      30 Jan 2003 01:40:14 
+-0000
@@ -51,7 +51,7 @@
 import com.werken.blissed.Described;
 
 import org.apache.commons.jelly.XMLOutput;
-import org.apache.commons.jelly.JellyException;
+import org.apache.commons.jelly.JellyTagException;
 
 /** Create a new process.
  *
@@ -179,9 +179,9 @@
      *
      *  @param output The output sink.
      *
-     *  @throws Exception if an error occurs.
+     *  @throws JellyTagException if an error occurs.
      */
-    public void doTag(XMLOutput output) throws Exception
+    public void doTag(XMLOutput output) throws JellyTagException
     {
         checkStringAttribute( "name",
                               getName() );
@@ -198,7 +198,7 @@
 
         if ( startState == null )
         {
-            throw new JellyException( "Start state \"" + getStart() + "\" not found." 
);
+            throw new JellyTagException( "Start state \"" + getStart() + "\" not 
+found." );
         }
 
         this.process.setStartState( startState );
Index: src/java/main/com/werken/blissed/jelly/SpawnTag.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/SpawnTag.java,v
retrieving revision 1.4
diff -u -r1.4 SpawnTag.java
--- src/java/main/com/werken/blissed/jelly/SpawnTag.java        18 Sep 2002 15:49:17 
-0000      1.4
+++ src/java/main/com/werken/blissed/jelly/SpawnTag.java        30 Jan 2003 01:40:14 
+-0000
@@ -46,12 +46,15 @@
  
  */
 
+import com.werken.blissed.ActivityException;
+import com.werken.blissed.InvalidMotionException;
 import com.werken.blissed.Process;
+import com.werken.blissed.ProcessDataInstantiationException;
 import com.werken.blissed.ProcessEngine;
 import com.werken.blissed.ProcessContext;
 
 import org.apache.commons.jelly.XMLOutput;
-import org.apache.commons.jelly.JellyException;
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.MissingAttributeException;
 
 /** Spawn a new process.
@@ -119,7 +122,7 @@
      *
      *  @throws Exception If a process library cannot be found.
      */
-    public Process getProcess() throws Exception
+    public Process getProcess() throws JellyTagException
     {
         return this.process;
     }
@@ -206,9 +209,9 @@
      *
      *  @param output The output sink.
      *
-     *  @throws Exception if an error occurs.
+     *  @throws JellyTagException if an error occurs.
      */
-    public void doTag(XMLOutput output) throws Exception
+    public void doTag(XMLOutput output) throws JellyTagException
     {
         checkObjectAttribute( "process",
                               this.process );
@@ -234,8 +237,7 @@
                 async = this.async.booleanValue();
             }
 
-            spawned = engine.spawn( getProcess(),
-                                    async );
+                       spawned = spawnContext(engine, async);
         }
         else
         {
@@ -243,11 +245,11 @@
 
             if ( this.async != null )
             {
-                throw new JellyException( "async attribute only via for non-nested 
process" );
+                throw new JellyTagException( "async attribute only via for non-nested 
+process" );
             }
 
-            spawned = engine.spawn( getProcess(),
-                                    context );
+
+                       spawned = spawnContext(context, engine);
         }
 
         if ( getVar() != null )
@@ -256,4 +258,37 @@
                                       spawned );
         }
     }
+
+       protected ProcessContext spawnContext(
+               ProcessContext context,
+               ProcessEngine engine)
+               throws
+                       JellyTagException {
+                
+               ProcessContext spawned = null;
+        try {
+                   spawned = engine.spawn( getProcess(),
+                                           context );
+        } catch (Exception e) {
+            throw new JellyTagException(e);
+        }
+               return spawned;
+       }
+
+       protected ProcessContext spawnContext(ProcessEngine engine, boolean async)
+               throws JellyTagException
+
+             {
+               ProcessContext spawned = null;
+        try 
+        {
+                   spawned = engine.spawn( getProcess(),
+                                           async );
+        }
+        catch (Exception e)
+        {
+            throw new JellyTagException(e);
+        }
+               return spawned;
+       }
 }
Index: src/java/main/com/werken/blissed/jelly/StartEngineTag.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/StartEngineTag.java,v
retrieving revision 1.1
diff -u -r1.1 StartEngineTag.java
--- src/java/main/com/werken/blissed/jelly/StartEngineTag.java  18 Sep 2002 17:05:53 
-0000      1.1
+++ src/java/main/com/werken/blissed/jelly/StartEngineTag.java  30 Jan 2003 01:40:14 
+-0000
@@ -46,6 +46,7 @@
  
  */
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 
 /** Start a <code>ProcessEngine</code>.
@@ -80,9 +81,9 @@
      *
      *  @param output The output sink.
      *
-     *  @throws Exception if an error occurs.
+     *  @throws JellyTagException if an error occurs.
      */
-    public void doTag(XMLOutput output) throws Exception
+    public void doTag(XMLOutput output) throws JellyTagException
     {
         checkObjectAttribute( "engine",
                               getEngine() );
Index: src/java/main/com/werken/blissed/jelly/StateTag.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/StateTag.java,v
retrieving revision 1.11
diff -u -r1.11 StateTag.java
--- src/java/main/com/werken/blissed/jelly/StateTag.java        18 Sep 2002 17:59:58 
-0000      1.11
+++ src/java/main/com/werken/blissed/jelly/StateTag.java        30 Jan 2003 01:40:14 
+-0000
@@ -46,10 +46,12 @@
  
  */
 
+import com.werken.blissed.DuplicateStateException;
 import com.werken.blissed.Process;
 import com.werken.blissed.State;
 import com.werken.blissed.Described;
 
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 
 /** Create a new state.
@@ -142,17 +144,24 @@
      *
      *  @param output The output sink.
      *
-     *  @throws Exception if an error occurs.
+     *  @throws JellyTagException if an error occurs.
      */
-    public void doTag(XMLOutput output) throws Exception
+    public void doTag(XMLOutput output) throws JellyTagException
     {
         Process process = getCurrentProcess();
 
         checkStringAttribute( "name",
                               this.name );
 
-        this.state = process.addState( this.name,
-                                       this.description );
+        try
+        {
+            this.state = process.addState( this.name,
+                                            this.description );
+        } 
+        catch (DuplicateStateException e)
+        {
+            throw new JellyTagException( e );
+        }
 
         invokeBody( output );
 
Index: src/java/main/com/werken/blissed/jelly/StopEngineTag.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/StopEngineTag.java,v
retrieving revision 1.1
diff -u -r1.1 StopEngineTag.java
--- src/java/main/com/werken/blissed/jelly/StopEngineTag.java   18 Sep 2002 17:05:53 
-0000      1.1
+++ src/java/main/com/werken/blissed/jelly/StopEngineTag.java   30 Jan 2003 01:40:14 
+-0000
@@ -45,7 +45,7 @@
  OF THE POSSIBILITY OF SUCH DAMAGE.
  
  */
-
+import org.apache.commons.jelly.JellyTagException;
 import org.apache.commons.jelly.XMLOutput;
 
 /** Stop a <code>ProcessEngine</code>.
@@ -80,13 +80,20 @@
      *
      *  @param output The output sink.
      *
-     *  @throws Exception if an error occurs.
+     *  @throws JellyTagException if an error occurs.
      */
-    public void doTag(XMLOutput output) throws Exception
+    public void doTag(XMLOutput output) throws JellyTagException
     {
         checkObjectAttribute( "engine",
                               getEngine() );
 
-        getEngine().stop();
+        try 
+        {
+            getEngine().stop();
+        }
+        catch (InterruptedException e) 
+        {
+            throw new JellyTagException(e);
+        }
     }
 }
Index: src/java/main/com/werken/blissed/jelly/TransitionTag.java
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/main/com/werken/blissed/jelly/TransitionTag.java,v
retrieving revision 1.8
diff -u -r1.8 TransitionTag.java
--- src/java/main/com/werken/blissed/jelly/TransitionTag.java   17 Sep 2002 23:00:05 
-0000      1.8
+++ src/java/main/com/werken/blissed/jelly/TransitionTag.java   30 Jan 2003 01:40:14 
+-0000
@@ -52,7 +52,7 @@
 import com.werken.blissed.Described;
 
 import org.apache.commons.jelly.XMLOutput;
-import org.apache.commons.jelly.JellyException;
+import org.apache.commons.jelly.JellyTagException;
 
 /** Create a transition.
  *
@@ -140,9 +140,9 @@
      *
      *  @param output The output sink.
      *
-     *  @throws Exception if an error occurs.
+     *  @throws JellyTagException if an error occurs.
      */
-    public void doTag(XMLOutput output) throws Exception
+    public void doTag(XMLOutput output) throws JellyTagException
     {
         Process process = getCurrentProcess();
 
@@ -156,14 +156,14 @@
 
         if ( fromState == null )
         {
-            throw new JellyException( "No such state \"" + this.from  + "\"" );
+            throw new JellyTagException( "No such state \"" + this.from  + "\"" );
         }
 
         State toState = process.getState( this.to );
 
         if ( toState == null )
         {
-            throw new JellyException( "No such state \"" + this.to  + "\"" );
+            throw new JellyTagException( "No such state \"" + this.to  + "\"" );
         }
 
         this.transition = fromState.addTransition( toState,
Index: src/java/test/com/werken/blissed/jelly/BlissedTagLibraryTest.jelly
===================================================================
RCS file: 
/cvsroot/blissed/blissed/src/java/test/com/werken/blissed/jelly/BlissedTagLibraryTest.jelly,v
retrieving revision 1.12
diff -u -r1.12 BlissedTagLibraryTest.jelly
--- src/java/test/com/werken/blissed/jelly/BlissedTagLibraryTest.jelly  1 Oct 2002 
23:04:16 -0000       1.12
+++ src/java/test/com/werken/blissed/jelly/BlissedTagLibraryTest.jelly  30 Jan 2003 
+01:40:14 -0000
@@ -94,7 +94,7 @@
       <process name="foo" start="noStart"/>
     </j:catch>
     <test:assert 
-          test="${(e != null) and (e.message.startsWith( 'Start state' 
))}">start-state not found</test:assert>
+          test="${(e != null) and (e.message.endsWith ('not found.' ))}">start-state 
+not found</test:assert>
   </test:case>
 
   <test:case name="testProcessTag_Var">
@@ -125,7 +125,7 @@
       <state/>
     </j:catch>
     <test:assert 
-          test="${(e != null) and (e.message.startsWith( 'Not within a process' 
))}">not within a process</test:assert>
+          test="${(e != null) and (e.message.endsWith( 'Not within a process element' 
+))}">not within a process</test:assert>
   </test:case>
 
   <test:case name="testStateTag_NoName">

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to