donaldp     2002/07/13 19:06:03

  Modified:    src/java/org/apache/log Hierarchy.java
  Log:
  Extract out the messages to separate variables. Makes easier to i18n later.
  
  Revision  Changes    Path
  1.17      +6 -3      jakarta-avalon-logkit/src/java/org/apache/log/Hierarchy.java
  
  Index: Hierarchy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/Hierarchy.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Hierarchy.java    14 Jul 2002 01:54:47 -0000      1.16
  +++ Hierarchy.java    14 Jul 2002 02:06:03 -0000      1.17
  @@ -99,7 +99,8 @@
           {
               if( null == targets[ i ] )
               {
  -                throw new IllegalArgumentException( "Can not set DefaultLogTarget 
element to null" );
  +                final String message = "Can not set DefaultLogTarget element to 
null";
  +                throw new IllegalArgumentException( message );
               }
           }
   
  @@ -116,7 +117,8 @@
       {
           if( null == priority )
           {
  -            throw new IllegalArgumentException( "Can not set default Hierarchy 
Priority to null" );
  +            final String message = "Can not set default Hierarchy Priority to null";
  +            throw new IllegalArgumentException( message );
           }
   
           getRootLogger().setPriority( priority );
  @@ -131,7 +133,8 @@
       {
           if( null == errorHandler )
           {
  -            throw new IllegalArgumentException( "Can not set default Hierarchy 
ErrorHandler to null" );
  +            final String message = "Can not set default Hierarchy ErrorHandler to 
null";
  +            throw new IllegalArgumentException( message );
           }
   
           m_errorHandler = errorHandler;
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to