CVS: Tapestry/framework/src/net/sf/tapestry/html Script.java,1.14.2.1,1.14.2.2

Howard Lewis Ship <[email protected]>
Newsgroups gmane.comp.java.tapestry.cvs
Message-ID <[email protected]>
Update of /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/html
In directory sc8-pr-cvs1:/tmp/cvs-serv1120/framework/src/net/sf/tapestry/html

Modified Files:
      Tag: hship-2-3
	Script.java 
Log Message:
Minor improvements to exception reporting, to assist end-users in diagnosing problems.

Index: Script.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/html/Script.java,v
retrieving revision 1.14.2.1
retrieving revision 1.14.2.2
diff -C2 -d -r1.14.2.1 -r1.14.2.2
*** Script.java	7 Dec 2002 13:26:13 -0000	1.14.2.1
--- Script.java	17 Dec 2002 20:50:19 -0000	1.14.2.2
***************
*** 39,43 ****
      private String _scriptPath;
      private Map _baseSymbols;
!     
      /**
       *  A Map of input and output symbols visible to the body of the Script.
--- 39,43 ----
      private String _scriptPath;
      private Map _baseSymbols;
! 
      /**
       *  A Map of input and output symbols visible to the body of the Script.
***************
*** 46,50 ****
       * 
       **/
!     
      private Map _symbols;
  
--- 46,50 ----
       * 
       **/
! 
      private Map _symbols;
  
***************
*** 95,104 ****
       **/
  
!     private IScript getParsedScript(IRequestCycle cycle) throws RequiredParameterException
      {
          if (_scriptPath == null)
!             throw new RequiredParameterException(this, "scriptPath",
!             getBinding("scriptPath"));
!             
          IEngine engine = cycle.getEngine();
          IScriptSource source = engine.getScriptSource();
--- 95,103 ----
       **/
  
!     private IScript getParsedScript(IRequestCycle cycle) throws RequestCycleException
      {
          if (_scriptPath == null)
!             throw new RequiredParameterException(this, "scriptPath", getBinding("scriptPath"));
! 
          IEngine engine = cycle.getEngine();
          IScriptSource source = engine.getScriptSource();
***************
*** 110,114 ****
          IResourceLocation scriptLocation = rootLocation.getRelativeLocation(_scriptPath);
  
!         return source.getScript(scriptLocation);
      }
  
--- 109,121 ----
          IResourceLocation scriptLocation = rootLocation.getRelativeLocation(_scriptPath);
  
!         try
!         {
!             return source.getScript(scriptLocation);
!         }
!         catch (RuntimeException ex)
!         {
!             throw new RequestCycleException(this, ex);
!         }
! 
      }
  
***************
*** 125,129 ****
  
              _symbols = getInputSymbols();
!             
              try
              {
--- 132,136 ----
  
              _symbols = getInputSymbols();
! 
              try
              {
***************
*** 170,174 ****
       *  @since 2.2
       **/
!     
      public Map getSymbols()
      {
--- 177,181 ----
       *  @since 2.2
       **/
! 
      public Map getSymbols()
      {
***************
*** 179,183 ****
      {
          _symbols = null;
!         
          super.cleanupAfterRender(cycle);
      }
--- 186,190 ----
      {
          _symbols = null;
! 
          super.cleanupAfterRender(cycle);
      }



-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.