@Override public void undo(String cookieSentByRPC, Action<Result> action, Result result) throws ActionException, ServiceException { 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()); } }
@Override public void undo(String cookieSentByRPC, Action<Result> action, Result result) throws ActionException, ServiceException { 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()); } }
if (logger.isLoggable(Level.WARNING)) { String newMessage = "Action exception while executing " + action.getClass().getName() + ": " + e.getMessage(); logger.log(Level.WARNING, newMessage, e);
if (logger.isLoggable(Level.WARNING)) { String newMessage = "Action exception while executing " + action.getClass().getName() + ": " + e.getMessage(); logger.log(Level.WARNING, newMessage, e);
@Override public void undo(String cookieSentByRPC, Action<Result> action, Result result) throws ActionException, ServiceException { 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.log(e, action, DispatchType.Undo); throw new ActionException(e.getMessage()); } catch (ServiceException e) { logger.log(e, action, DispatchType.Undo); throw new ServiceException(e.getMessage()); } catch (RuntimeException e) { logger.log(e, action, DispatchType.Undo); throw new ServiceException(e.getMessage()); } }