buildframework/helium/tools/common/java/src/com/nokia/ant/util/ToolsProcess.java
changeset 179 d8ac696cc51f
parent 1 be27ed110b50
equal deleted inserted replaced
1:be27ed110b50 179:d8ac696cc51f
    46             toolClass = Class.forName(className);
    46             toolClass = Class.forName(className);
    47             Tool tool = (Tool) toolClass.newInstance();
    47             Tool tool = (Tool) toolClass.newInstance();
    48             log.debug("Found tool" + reqTool);
    48             log.debug("Found tool" + reqTool);
    49             return tool;
    49             return tool;
    50         } catch (ClassNotFoundException e1) {
    50         } catch (ClassNotFoundException e1) {
    51             log.debug("Tool not found exception:", e1);
       
    52             throw new ToolsProcessException("tool not supported: " + className);
    51             throw new ToolsProcessException("tool not supported: " + className);
    53         } catch (InstantiationException e2) {
    52         } catch (InstantiationException e2) {
    54             log.debug("Tool instantiation exception: ", e2);
       
    55             throw new ToolsProcessException("tool " + toolClass
    53             throw new ToolsProcessException("tool " + toolClass
    56                     + "cannot be instantiated");
    54                     + "cannot be instantiated");
    57         } catch (IllegalAccessException e3) {
    55         } catch (IllegalAccessException e3) {
    58             log.debug("Tool illegal access exception: ", e3);
       
    59             throw new ToolsProcessException("tool " + toolClass
    56             throw new ToolsProcessException("tool " + toolClass
    60                     + " cannot be accessed");
    57                     + " cannot be accessed");
    61         }
    58         }
    62     }
    59     }
    63 }
    60 }