avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pro...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/factory PriorityFilterTargetFactory.java
Date Wed, 21 Aug 2002 18:47:02 GMT
proyal      2002/08/21 11:47:02

  Modified:    logger/src/java/org/apache/avalon/excalibur/logger/factory
                        PriorityFilterTargetFactory.java
  Log:
  Throw nice error rather than NullPointerException
  
  Revision  Changes    Path
  1.3       +8 -1      jakarta-avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/factory/PriorityFilterTargetFactory.java
  
  Index: PriorityFilterTargetFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/logger/src/java/org/apache/avalon/excalibur/logger/factory/PriorityFilterTargetFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PriorityFilterTargetFactory.java	7 Aug 2002 13:37:00 -0000	1.2
  +++ PriorityFilterTargetFactory.java	21 Aug 2002 18:47:02 -0000	1.3
  @@ -104,6 +104,13 @@
           for( int i = 0; i < configs.length; i++ )
           {
               final LogTargetFactory factory = m_logTargetFactoryManager.getLogTargetFactory(
configs[ i ].getName() );
  +
  +            if( null == factory )
  +            {
  +                throw new ConfigurationException( "Unknown target type '" + configs[ i
].getName()
  +                                                  + "' at " + configs[i].getLocation()
);
  +            }
  +
               getLogger().debug( "creating target " + configs[ i ].getName() + ": " + configs[
i ].toString() );
               final LogTarget logtarget = factory.createTarget( configs[ i ] );
               filter.addTarget( logtarget );
  
  
  

--
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