Code example for MissingResourceException

Methods: getMessage

0
 
    static { 
        try { 
            resources = ResourceBundle.getBundle("org.wso2.carbon.caching.errors");
        } catch (MissingResourceException e) {
            throw new RuntimeException(e.getMessage());
        } 
    } 
 
    /** 
     * Creates a new <code>CachingComponentException</code> instance. 
     * 
     * @param errorCode a key field in the <code>errors.properties</code>.             
     * @param args the set of arguments which will be put into the error message. 
     * @param log the <code>Log</code> object for the originating class. 
     */ 
    public CachingComponentException (String errorCode, Object[] args, Log log) {
        super(msg = getMessage(errorCode, args));
        log.error(msg);
    }