jvanzyl     00/11/27 17:43:06

  Modified:    src/java/org/apache/velocity/runtime Runtime.java
  Log:
  - added a big fat exception in the initializeDirectives() method.
    if the directive.properties input stream isn't found then
    something is seriously wrong! Or jason didn't commit the
    latest build file :-)
  
  Revision  Changes    Path
  1.61      +8 -1      
jakarta-velocity/src/java/org/apache/velocity/runtime/Runtime.java
  
  Index: Runtime.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/Runtime.java,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- Runtime.java      2000/11/28 01:05:39     1.60
  +++ Runtime.java      2000/11/28 01:43:02     1.61
  @@ -154,7 +154,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Jeff Bowden</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magusson Jr.</a>
  - * @version $Id: Runtime.java,v 1.60 2000/11/28 01:05:39 jvanzyl Exp $
  + * @version $Id: Runtime.java,v 1.61 2000/11/28 01:43:02 jvanzyl Exp $
    */
   public class Runtime implements RuntimeConstants
   {
  @@ -700,6 +700,13 @@
           InputStream inputStream = classLoader
               .getResourceAsStream(DEFAULT_RUNTIME_DIRECTIVES);
       
  +        if (inputStream == null)
  +            throw new Exception("Error loading directive.properties! " +
  +                                "Something is very wrong if this properties " +
  +                                "isn't being located. Either your Velocity " +
  +                                "distribution is incomplete or your Velocity " +
  +                                "jar file is corrupted!");
  +        
           directiveProperties.load(inputStream);
           
           /*
  
  
  

Reply via email to