Package com.cedarsolutions.exception

Examples of com.cedarsolutions.exception.CedarRuntimeException


    public <T extends Serializable> T getSessionAttribute(String name) {
        HttpSession session = this.getRequestSession();
        if (session != null) {
            return (T) session.getAttribute(name);
        } else {
            throw new CedarRuntimeException("Could not get session attribute: session is null");
        }
    }
View Full Code Here


    public <T extends Serializable> void setSessionAttribute(String name, T value) {
        HttpSession session = this.getRequestSession();
        if (session != null) {
            session.setAttribute(name, value);
        } else {
            throw new CedarRuntimeException("Could not set session attribute: session is null");
        }
    }
View Full Code Here

    private void addTranslators(ClassPool classPool) {
        try {
            addTranslator(classPool, new GwtCreateTranslator());
        } catch (Exception e) {
            throw new CedarRuntimeException("Error adding translator: " + e.getMessage(), e);
        }
    }
View Full Code Here

    public synchronized long getElapsedTime() {
        try {
            long elapsedTime = this.stop.getTime() - this.start.getTime();
            return elapsedTime < 0 ? 0 : elapsedTime;
        } catch (NullPointerException e) {
            throw new CedarRuntimeException("Timer has not been properly started and stopped.");
        }
    }
View Full Code Here

            // By creating this spy, the real underlying code will be called, but we'll
            // be able to verify the arguments that are passed in to the method calls.
            return spy(realEmailService);
        } catch (IOException e) {
            // We just have to catch IOException to satisfy File.getPath() interface
            throw new CedarRuntimeException("Error creating partial mock: " + e.getMessage(), e);
        }
    }
View Full Code Here

TOP

Related Classes of com.cedarsolutions.exception.CedarRuntimeException

Copyright © 2018 www.massapicom. 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.