Changeset 724


Ignore:
Timestamp:
08/31/12 10:27:23 (12 years ago)
Author:
pharms
Message:
  • use console for logging instead of logger
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-core-events/src/main/java/de/ugoe/cs/quest/eventcore/guimodel/GUIElementFactory.java

    r655 r724  
    1010import java.util.Properties; 
    1111import java.util.logging.Level; 
    12 import java.util.logging.Logger; 
     12 
     13import de.ugoe.cs.util.console.Console; 
    1314 
    1415/** 
     
    8687 
    8788                if (!IGUIElement.class.isAssignableFrom(clazz)) { 
    88                     Logger.getLogger(this.getClass().getName()).warning 
    89                         ("configured GUI element representing class " + className + 
    90                          " is no valid GUIElement " + "derivate."); 
     89                    Console.traceln(Level.WARNING, "configured GUI element representing class " + 
     90                                    className + " is no valid GUIElement derivate."); 
    9191 
    9292                    return null; 
     
    143143            } 
    144144            catch (ClassNotFoundException e) { 
    145                 Logger.getLogger(this.getClass().getName()).warning 
    146                     ("configured GUI element representing class " + className + 
    147                      " can not be loaded."); 
     145                Console.traceln(Level.WARNING, "configured GUI element representing class " + 
     146                                className + " can not be loaded."); 
    148147                throw new GUIModelConfigurationException 
    149148                    ("configured GUI element representing class " + className + 
     
    151150            } 
    152151            catch (SecurityException e) { 
    153                 Logger.getLogger(this.getClass().getName()).log 
    154                     (Level.WARNING, "configured GUI element representing class " + className + 
     152                Console.traceln(Level.WARNING, "configured GUI element representing class " + 
     153                                className + " can not be instantiated due to security reasons."); 
     154                throw new GUIModelConfigurationException 
     155                    ("configured GUI element representing class " + className + 
    155156                     " can not be instantiated due to security reasons.", e); 
    156                 throw new GUIModelConfigurationException 
    157                     ("configured GUI element representing class " + className + 
    158                      " can not be instantiated due to security reasons.", e); 
    159157            } 
    160158            catch (NoSuchMethodException e) { 
    161                 Logger.getLogger(this.getClass().getName()).warning 
    162                     ("configured GUI element representing class " + className + 
    163                      " does not provide an appropriate constructur."); 
    164                 throw new GUIModelConfigurationException 
    165                     ("configured GUI element representing class " + className + 
    166                      " does not provide an appropriate constructur.", e); 
     159                Console.traceln(Level.WARNING, "configured GUI element representing class " + 
     160                                className + " does not provide an appropriate constructor."); 
     161                throw new GUIModelConfigurationException 
     162                    ("configured GUI element representing class " + className + 
     163                     " does not provide an appropriate constructor.", e); 
    167164            } 
    168165            catch (IllegalArgumentException e) { 
    169                 Logger.getLogger(this.getClass().getName()).warning 
     166                Console.traceln(Level.WARNING, "configured GUI element representing class " + 
     167                                className + " does not provide an appropriate constructor " + 
     168                                "accepting the provided parameters."); 
     169                throw new GUIModelConfigurationException 
    170170                    ("configured GUI element representing class " + className + " does not " + 
    171                      "provide an appropriate constructur accepting the provided parameters."); 
    172                 throw new GUIModelConfigurationException 
    173                     ("configured GUI element representing class " + className + " does not " + 
    174                      "provide an appropriate constructur accepting the provided parameters.", e); 
     171                     "provide an appropriate constructor accepting the provided parameters.", e); 
    175172            } 
    176173            catch (InstantiationException e) { 
    177                 Logger.getLogger(this.getClass().getName()).log 
    178                     (Level.WARNING, "configured GUI element representing class " + className + 
     174                Console.traceln(Level.WARNING, "configured GUI element representing class " + 
     175                                className + " can not be instantiated."); 
     176                throw new GUIModelConfigurationException 
     177                    ("configured GUI element representing class " + className + 
    179178                     " can not be instantiated.", e); 
     179            } 
     180            catch (IllegalAccessException e) { 
     181                Console.traceln(Level.WARNING, "configured GUI element representing class " + 
     182                                className + " can not be instantiated."); 
    180183                throw new GUIModelConfigurationException 
    181184                    ("configured GUI element representing class " + className + 
    182185                     " can not be instantiated.", e); 
    183186            } 
    184             catch (IllegalAccessException e) { 
    185                 Logger.getLogger(this.getClass().getName()).log 
    186                     (Level.WARNING, "configured GUI element representing class " + className + 
    187                      " can not be instantiated.", e); 
    188                 throw new GUIModelConfigurationException 
    189                     ("configured GUI element representing class " + className + 
    190                      " can not be instantiated.", e); 
    191             } 
    192187            catch (InvocationTargetException e) { 
    193                 Logger.getLogger(this.getClass().getName()).log 
    194                     (Level.WARNING, "configured GUI element representing class " + className + 
    195                      " can not be instantiated.", e); 
     188                Console.traceln(Level.WARNING, "configured GUI element representing class " + 
     189                                className + " can not be instantiated."); 
    196190                throw new GUIModelConfigurationException 
    197191                    ("configured GUI element representing class " + className + 
     
    201195         
    202196        if (guiElement == null ) { 
    203             Logger.getLogger(this.getClass().getName()).log 
    204                 (Level.WARNING, "no class representing GUI elements of type " + 
    205                  specification.getType() + " found. Please extends GUI element mapping files."); 
     197            Console.traceln(Level.WARNING, "no class representing GUI elements of type " + 
     198                            specification.getType() + " found. Please extends GUI element " + 
     199                            "mapping files."); 
    206200            throw new GUIModelConfigurationException 
    207201                ("no class representing GUI elements of type " + specification.getType() + 
Note: See TracChangeset for help on using the changeset viewer.