Package com.gwtplatform.dispatch.shared

Examples of com.gwtplatform.dispatch.shared.ActionException


      final ExecutionContext context) throws ActionException {
    try {
      userDao.get().logoutSessionUser();
      return null;
    } catch (Exception cause) {
      throw new ActionException(cause);
    }
  }
View Full Code Here


 
    // Verify that the input is valid.
    if (!FieldVerifier.isValidName(input)) {
      // If the input is not valid, throw an IllegalArgumentException back to
      // the client.
      throw new ActionException("Name must be at least 4 characters long");
    }
 
    String serverInfo = servletContext.getServerInfo();
    String userAgent = requestProvider.get().getHeader("User-Agent");
    return new SendTextToServerResult("Hello, " + input
View Full Code Here

 
    // Verify that the input is valid.
    if (!FieldVerifier.isValidName(input)) {
      // If the input is not valid, throw an IllegalArgumentException back to
      // the client.
      throw new ActionException("Name must be at least 4 characters long");
    }
 
    String serverInfo = servletContext.getServerInfo();
    String userAgent = requestProvider.get().getHeader("User-Agent");
    return new SendTextToServerResult("Hello, " + input
View Full Code Here

        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) {
View Full Code Here

        if (bodyType != null && canSerialize(bodyType)) {
            try {
                return serialize(object, bodyType);
            } catch (JsonMappingException e) {
                throw new ActionException("Unable to serialize request body. An unexpected error occurred.", e);
            }
        }

        throw new ActionException("Unable to serialize request body. No serializer found.");
    }
View Full Code Here

                        throw (ActionException) e;
                    }
                    if (e instanceof RuntimeException) {
                        throw (RuntimeException) e;
                    } else {
                        throw new ActionException(e);
                    }
                }
            }
            results.add(result);
        }
View Full Code Here

        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) {
View Full Code Here

                        throw (ActionException) e;
                    }
                    if (e instanceof RuntimeException) {
                        throw (RuntimeException) e;
                    } else {
                        throw new ActionException(e);
                    }
                }
            }
            results.add(result);
        }
View Full Code Here

    @Override
    public <A extends RestAction<R>, R> R deserialize(A action, Response response) throws ActionException {
        if (isSuccessStatusCode(response)) {
            return getDeserializedResponse(action, response);
        } else {
            throw new ActionException(response.getStatusText());
        }
    }
View Full Code Here

        if (!Strings.isNullOrEmpty(resultType) && canDeserialize(resultType)) {
            try {
                String json = response.getText();
                return deserializeValue(resultType, json);
            } catch (JsonMappingException e) {
                throw new ActionException("Unable to deserialize response. An unexpected error occurred.", e);
            }
        }

        throw new ActionException("Unable to deserialize response. No serializer found.");
    }
View Full Code Here

TOP

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

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.