Author: nbubna
Date: Mon Jan 11 20:19:20 2010
New Revision: 898052

URL: http://svn.apache.org/viewvc?rev=898052&view=rev
Log:
VELOCITY-751 fix incorrect 'throws Exception' stuff (thanks to Jarkko Viinamaki)

Modified:
    
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/app/Velocity.java
    
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeInstance.java
    
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeServices.java
    
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
    
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/resource/ResourceManager.java

Modified: 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/app/Velocity.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/app/Velocity.java?rev=898052&r1=898051&r2=898052&view=diff
==============================================================================
--- 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/app/Velocity.java 
(original)
+++ 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/app/Velocity.java 
Mon Jan 11 20:19:20 2010
@@ -91,8 +91,6 @@
      *  plus the properties in the passed in java.util.Properties object
      *
      *  @param p  Properties object containing initialization properties
-     * @throws Exception When an error during initialization occurs.
-     *
      */
     public static void init( Properties p )
     {
@@ -234,7 +232,7 @@
     }
 
     /**
-     *  merges a template and puts the rendered stream into the writer
+     *  Merges a template and puts the rendered stream into the writer
      *
      *  @param templateName name of template to be used in merge
      *  @param encoding encoding used in template
@@ -247,7 +245,6 @@
      * @throws ParseErrorException The template could not be parsed.
      * @throws MethodInvocationException A method on a context object could 
not be invoked.
      * @throws ResourceNotFoundException A referenced resource could not be 
loaded.
-     * @throws Exception Any other exception.
      *
      * @since Velocity v1.1
      */
@@ -281,7 +278,6 @@
      *          from any available source.
      * @throws ParseErrorException if template cannot be parsed due
      *          to syntax (or other) error.
-     * @throws Exception if an error occurs in template initialization
      */
     public static Template getTemplate(String name)
         throws ResourceNotFoundException, ParseErrorException
@@ -300,7 +296,6 @@
      *          from any available source.
      * @throws ParseErrorException if template cannot be parsed due
      *          to syntax (or other) error.
-     * @throws Exception if an error occurs in template initialization
      *
      *  @since Velocity v1.1
      */

Modified: 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeInstance.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeInstance.java?rev=898052&r1=898051&r2=898052&view=diff
==============================================================================
--- 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeInstance.java
 (original)
+++ 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeInstance.java
 Mon Jan 11 20:19:20 2010
@@ -248,7 +248,6 @@
      *   <li>Static Content Include System</li>
      *   <li>Velocimacro System</li>
      * </ul>
-     * @throws Exception When an error occured during initialization.
      */
     public synchronized void init()
     {
@@ -641,8 +640,7 @@
      * Initialize the Velocity Runtime with a Properties
      * object.
      *
-     * @param p
-     * @throws Exception When an error occurs during initialization.
+     * @param p Velocity properties for initialization
      */
     public void init(Properties p)
     {

Modified: 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeServices.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeServices.java?rev=898052&r1=898051&r2=898052&view=diff
==============================================================================
--- 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeServices.java
 (original)
+++ 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeServices.java
 Mon Jan 11 20:19:20 2010
@@ -70,9 +70,8 @@
      *   <li>Static Content Include System</li>
      *   <li>Velocimacro System</li>
      * </ul>
-     * @throws Exception
      */
-    public void init() throws Exception;
+    public void init();
 
     /**
      * Allows an external system to set a property in
@@ -139,18 +138,16 @@
      * object.
      *
      * @param p
-     * @throws Exception
      */
-    public void init(Properties p) throws Exception;
+    public void init(Properties p);
 
     /**
      * Initialize the Velocity Runtime with the name of
      * ExtendedProperties object.
      *
      * @param configurationFile
-     * @throws Exception
      */
-    public void init(String configurationFile) throws Exception;
+    public void init(String configurationFile);
 
     /**
      * Wraps the String in a StringReader and passes it off to
@@ -295,7 +292,6 @@
      * @throws ResourceNotFoundException if template not found
      *          from any available source.
      * @throws ParseErrorException
-     * @throws Exception
      */
     public ContentResource getContent(String name)
         throws ResourceNotFoundException, ParseErrorException;
@@ -310,7 +306,6 @@
      * @throws ResourceNotFoundException if template not found
      *          from any available source.
      * @throws ParseErrorException
-     * @throws Exception
      */
     public ContentResource getContent( String name, String encoding )
         throws ResourceNotFoundException, ParseErrorException;

Modified: 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeSingleton.java?rev=898052&r1=898051&r2=898052&view=diff
==============================================================================
--- 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
 (original)
+++ 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
 Mon Jan 11 20:19:20 2010
@@ -311,8 +311,6 @@
      *          from any available source.
      * @throws ParseErrorException if template cannot be parsed due
      *          to syntax (or other) error.
-     * @throws Exception if an error occurs in template initialization
-     * @throws ParseErrorException When the template could not be parsed.
      * @see RuntimeInstance#getTemplate(String, String)
      */
     public static Template getTemplate(String name, String  encoding)

Modified: 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/resource/ResourceManager.java
URL: 
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/resource/ResourceManager.java?rev=898052&r1=898051&r2=898052&view=diff
==============================================================================
--- 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/resource/ResourceManager.java
 (original)
+++ 
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/resource/ResourceManager.java
 Mon Jan 11 20:19:20 2010
@@ -64,7 +64,6 @@
      *          from any available source.
      * @throws ParseErrorException if template cannot be parsed due
      *          to syntax (or other) error.
-     * @throws Exception if a problem in parse
      */
     public Resource getResource(String resourceName, int resourceType, String 
encoding )
         throws ResourceNotFoundException, ParseErrorException;


Reply via email to