Examples of LoggedRuntimeException


Examples of org.wso2.carbon.rulecep.commons.LoggedRuntimeException

        if (String.class.getName().equals(className)) {
            return value;
        } else {
            Class aClass = loadAClass(className);
            if (aClass == null) {
                throw new LoggedRuntimeException("Cannot find a class with name : " + className,
                        log);
            }
            String mName = "valueOf";
            try {
                Method method = aClass.getMethod(mName, value.getClass());
                if (log.isDebugEnabled()) {
                    log.debug("Invoking method "
                            + mName + "(" + value + ")");
                }
                return method.invoke(null, value);

            } catch (InvocationTargetException e) {
                throw new LoggedRuntimeException("Error Invoking method : " + mName + "into " +
                        className + " with parameter " + value + ": " + e.getMessage(), e, log);
            } catch (NoSuchMethodException e) {
                throw new LoggedRuntimeException("Error locating a method : " + mName + " from " +
                        className + " with parameter " + value + ": " + e.getMessage(), e, log);
            } catch (IllegalAccessException e) {
                throw new LoggedRuntimeException("Error Invoking method : " + mName + "into " +
                        className + " with parameter " + value + ": " + e.getMessage(), e, log);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.