avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ne...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/i18n DefaultBundleLoader.java
Date Thu, 27 Dec 2001 14:27:23 GMT
neeme       01/12/27 06:27:23

  Modified:    src/scratchpad/org/apache/avalon/excalibur/i18n
                        DefaultBundleLoader.java
  Log:
  no need to log full stacktrace, if the bundle file is not found
  now it logs only a warning about that file not found.
  
  Revision  Changes    Path
  1.8       +7 -3      jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/i18n/DefaultBundleLoader.java
  
  Index: DefaultBundleLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/i18n/DefaultBundleLoader.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DefaultBundleLoader.java	2001/12/26 21:26:05	1.7
  +++ DefaultBundleLoader.java	2001/12/27 14:27:23	1.8
  @@ -8,6 +8,7 @@
   package org.apache.avalon.excalibur.i18n;
   
   import java.util.Locale;
  +import java.io.FileNotFoundException;
   
   import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  @@ -21,7 +22,7 @@
    * Used to map locale information to URI space, to find the relevant bundle.
    *
    * @author <a href="mailto:neeme@apache.org">Neeme Praks</a>
  - * @version CVS $Revision: 1.7 $ $Date: 2001/12/26 21:26:05 $ $Author: neeme $
  + * @version CVS $Revision: 1.8 $ $Date: 2001/12/27 14:27:23 $ $Author: neeme $
    */
   
   public class DefaultBundleLoader extends AbstractLogEnabled implements BundleLoader, Composable
{
  @@ -181,11 +182,14 @@
               bundle.setLoadOnInit(cacheAllValues());
               bundle.init(uri);
               bundle.setLastModified(System.currentTimeMillis());
  +            return bundle;
           }
  +        catch (FileNotFoundException e) {
  +            getLogger().warn("File not found while loading bundle: " + bundleInfo + ",
uri " + uri);
  +        }
           catch (Exception e) {
               getLogger().error("Error while loading bundle: " + bundleInfo + ", uri " +
uri, e);
  -        bundle = null;
           }
  -        return bundle;
  +        return null;
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message