Package com.gwtplatform.dispatch.shared

Examples of com.gwtplatform.dispatch.shared.ServiceException


        try {
            if (actionValidator.isValid(action)) {
                return handler.execute(action, ctx);
            } else {
                throw new ServiceException(actionValidator.getClass().getName() + actionValidatorMessage + action
                        .getClass().getName());
            }
        } catch (ActionException e) {
            throw e;
        } catch (Exception e) {
            String newMessage = "Service exception executing action \"" + action.getClass().getSimpleName() + "\", " +
                    "" + e.toString();
            throw new ServiceException(newMessage, e);
        }
    }
View Full Code Here


        ActionHandler<A, R> handler = findHandler(action);
        try {
            if (actionValidator.isValid(action)) {
                handler.undo(action, result, ctx);
            } else {
                throw new ServiceException(actionValidator.getClass().getName() + actionValidatorMessage + action
                        .getClass().getName());
            }
        } catch (ActionException e) {
            throw e;
        } catch (Exception cause) {
            throw new ServiceException(cause);
        }
    }
View Full Code Here

        if (action.isSecured() && !cookieMatch(cookieSentByRPC)) {
            String message = xsrfAttackMessage + " While executing action: " + action.getClass().getName();

            logger.severe(message);
            throw new ServiceException(message);
        }

        try {
            return dispatch.execute(action);
        } catch (ActionException e) {
            if (logger.isLoggable(Level.WARNING)) {
                String newMessage = "Action exception while executing " + action.getClass().getName() + ": " +
                        e.getMessage();
                logger.log(Level.WARNING, newMessage, e);
            }

            removeStacktraces(e);

            throw e;
        } catch (ServiceException e) {
            if (logger.isLoggable(Level.WARNING)) {
                logger.log(Level.WARNING, "Service exception while executing " + action.getClass().getName() + ": " +
                        e.getMessage(), e);
            }

            throw new ServiceException(e.getMessage());
        } catch (RuntimeException e) {
            if (logger.isLoggable(Level.WARNING)) {
                logger.log(Level.WARNING, "Unexpected exception while executing " + action.getClass().getName() + ": " +
                        "" + e.getMessage(), e);
            }

            throw new ServiceException(e.getMessage());
        }
    }
View Full Code Here

        if (action.isSecured() && !cookieMatch(cookieSentByRPC)) {
            String message = xsrfAttackMessage + " While undoing action: " + action.getClass().getName();

            logger.severe(message);
            throw new ServiceException(message);
        }

        try {
            dispatch.undo(action, result);
        } catch (ActionException e) {
            logger.warning("Action exception while undoing " + action.getClass().getName() + ": " + e.getMessage());

            throw new ActionException(e.getMessage());
        } catch (ServiceException e) {
            logger.warning("Service exception while undoing " + action.getClass().getName() + ": " + e.getMessage());

            throw new ServiceException(e.getMessage());
        } catch (RuntimeException e) {
            logger.warning("Unexpected exception while undoing " + action.getClass().getName() + ": " + e.getMessage());

            throw new ServiceException(e.getMessage());
        }
    }
View Full Code Here

TOP

Related Classes of com.gwtplatform.dispatch.shared.ServiceException

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.