You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2003/05/30 21:43:01 UTC

cvs commit: jakarta-tapestry/framework/src/org/apache/tapestry ApplicationRuntimeException.java RenderRewoundException.java BindingException.java PageRedirectException.java

hlship      2003/05/30 12:43:01

  Modified:    framework/src/org/apache/tapestry/param
                        ConnectedParameterException.java
               framework/src/org/apache/tapestry
                        ApplicationRuntimeException.java
                        RenderRewoundException.java BindingException.java
                        PageRedirectException.java
  Log:
  Make ApplicationRuntimeException more abstract (change component property type from IComponent to just Object).
  
  Revision  Changes    Path
  1.5       +4 -11     jakarta-tapestry/framework/src/org/apache/tapestry/param/ConnectedParameterException.java
  
  Index: ConnectedParameterException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/org/apache/tapestry/param/ConnectedParameterException.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ConnectedParameterException.java	21 Apr 2003 13:15:41 -0000	1.4
  +++ ConnectedParameterException.java	30 May 2003 19:43:01 -0000	1.5
  @@ -71,13 +71,12 @@
   
   public class ConnectedParameterException extends ApplicationRuntimeException
   {
  -    private transient IComponent _component;
       private String _parameterName;
       private String _propertyName;
   
       public ConnectedParameterException(
           String message,
  -        IComponent component,
  +        Object component,
           String parameterName,
           String propertyName)
       {
  @@ -86,7 +85,7 @@
   
       public ConnectedParameterException(
           String message,
  -        IComponent component,
  +        Object component,
           String parameterName,
           String propertyName,
           Throwable rootCause)
  @@ -98,7 +97,7 @@
   
       public ConnectedParameterException(
           String message,
  -        IComponent component,
  +        Object component,
           String parameterName,
           String propertyName,
           ILocation location,
  @@ -106,14 +105,8 @@
       {
           super(message, location, rootCause);
   
  -        _component = component;
           _parameterName = parameterName;
           _propertyName = propertyName;
  -    }
  -
  -    public IComponent getComponent()
  -    {
  -        return _component;
       }
   
       public String getParameterName()
  
  
  
  1.5       +18 -14    jakarta-tapestry/framework/src/org/apache/tapestry/ApplicationRuntimeException.java
  
  Index: ApplicationRuntimeException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/org/apache/tapestry/ApplicationRuntimeException.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ApplicationRuntimeException.java	21 Apr 2003 13:15:30 -0000	1.4
  +++ ApplicationRuntimeException.java	30 May 2003 19:43:01 -0000	1.5
  @@ -57,7 +57,11 @@
   
   /**
    *  General wrapper for any exception (normal or runtime) that may occur during
  - *  a request cycle.
  + *  runtime processing for the application.  This is exception is used
  + *  when the intent is to communicate a low-level failure to the user or
  + *  developer; it is not expected to be caught.  The {@link #getRootCause() rootCause}
  + *  property is a <em>nested</em> exception (Tapestry supported this concept
  + *  long before the JDK did).
    *
    *  @author Howard Lewis Ship
    *  @version $Id$
  @@ -67,12 +71,12 @@
   {
       private Throwable _rootCause;
       private transient ILocation _location;
  -    private IComponent _component;
  +    private transient Object _component;
   
  -	public ApplicationRuntimeException(IComponent component, Throwable rootCause)
  -	{
  -		this(rootCause.getMessage(), component, null, rootCause);
  -	}
  +    public ApplicationRuntimeException(Object component, Throwable rootCause)
  +    {
  +        this(rootCause.getMessage(), component, null, rootCause);
  +    }
   
       public ApplicationRuntimeException(Throwable rootCause)
       {
  @@ -88,20 +92,20 @@
       {
           this(message, null, null, rootCause);
       }
  -    
  +
       public ApplicationRuntimeException(String message, IComponent component)
       {
  -    	this(message, component, null, null);
  +        this(message, component, null, null);
       }
   
  -    public ApplicationRuntimeException(String message, IComponent component, Throwable ex)
  +    public ApplicationRuntimeException(String message, Object component, Throwable ex)
       {
  -    	this(message, component, null, ex);
  +        this(message, component, null, ex);
       }
  -    
  +
       public ApplicationRuntimeException(
           String message,
  -        IComponent component,
  +        Object component,
           ILocation location,
           Throwable rootCause)
       {
  @@ -128,7 +132,7 @@
           return _location;
       }
   
  -    public IComponent getComponent()
  +    public Object getComponent()
       {
           return _component;
       }
  
  
  
  1.3       +5 -5      jakarta-tapestry/framework/src/org/apache/tapestry/RenderRewoundException.java
  
  Index: RenderRewoundException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/org/apache/tapestry/RenderRewoundException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RenderRewoundException.java	15 Mar 2003 21:22:09 -0000	1.2
  +++ RenderRewoundException.java	30 May 2003 19:43:01 -0000	1.3
  @@ -66,8 +66,8 @@
   
   public class RenderRewoundException extends ApplicationRuntimeException
   {
  -	public RenderRewoundException(IComponent component)
  -	{
  -		super(null, component, null, null);
  -	}
  +    public RenderRewoundException(Object component)
  +    {
  +        super(null, component, null, null);
  +    }
   }
  
  
  
  1.6       +3 -3      jakarta-tapestry/framework/src/org/apache/tapestry/BindingException.java
  
  Index: BindingException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/org/apache/tapestry/BindingException.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BindingException.java	21 Apr 2003 13:15:30 -0000	1.5
  +++ BindingException.java	30 May 2003 19:43:01 -0000	1.6
  @@ -80,7 +80,7 @@
   
       public BindingException(
           String message,
  -        IComponent component,
  +        Object component,
           IBinding binding,
           Throwable rootCause)
       {
  @@ -89,7 +89,7 @@
   
       public BindingException(
           String message,
  -        IComponent component,
  +        Object component,
           ILocation location,
           IBinding binding,
           Throwable rootCause)
  
  
  
  1.3       +5 -5      jakarta-tapestry/framework/src/org/apache/tapestry/PageRedirectException.java
  
  Index: PageRedirectException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/org/apache/tapestry/PageRedirectException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PageRedirectException.java	15 Mar 2003 21:22:08 -0000	1.2
  +++ PageRedirectException.java	30 May 2003 19:43:01 -0000	1.3
  @@ -70,7 +70,7 @@
   
       public PageRedirectException(String targetPageName)
       {
  -		this(targetPageName, null, targetPageName);
  +        this(targetPageName, null, targetPageName);
       }
   
       public PageRedirectException(IPage page)
  @@ -80,12 +80,12 @@
   
       public PageRedirectException(String message, IComponent component, String targetPageName)
       {
  -		this(message, component, null, targetPageName);
  +        this(message, component, null, targetPageName);
       }
   
       public PageRedirectException(
           String message,
  -        IComponent component,
  +        Object component,
           Throwable rootCause,
           String targetPageName)
       {
  @@ -96,7 +96,7 @@
   
       public PageRedirectException(String message, String targetPageName)
       {
  -    	this(message, null, targetPageName);
  +        this(message, null, targetPageName);
       }
   
       public String getTargetPageName()