Package com.daikit.commons.shared.exception.context

Examples of com.daikit.commons.shared.exception.context.DkExceptionContext


   * @param cause
   *           the cause
   */
  public DkNotEnoughPermissionException(final String message, final Throwable cause)
  {
    super(new DkExceptionContext(message), cause);
  }
View Full Code Here


   * @param cause
   *           the cause
   */
  public DkUserAlreadyAuthenticatedException(final String message, final Throwable cause)
  {
    super(new DkExceptionContext(message), cause);
  }
View Full Code Here

   * @param cause
   *           the cause
   */
  public DkHackingAttemptException(final String message, final Throwable cause)
  {
    super(new DkExceptionContext(message), cause);
  }
View Full Code Here

   * @param cause
   *           the cause
   */
  public DkUserNotAuthenticatedException(final String message, final Throwable cause)
  {
    super(new DkExceptionContext(message), cause);
  }
View Full Code Here

   * @param cause
   *           the cause
   */
  public DkBadLoginOrPasswordException(final String message, final Throwable cause)
  {
    super(new DkExceptionContext(message), cause);
  }
View Full Code Here

   * @param cause
   *           the cause
   */
  public DkUnauthorizedZoneException(final String message, final Throwable cause)
  {
    super(new DkExceptionContext(message), cause);
  }
View Full Code Here

    }
    // Create GwtLibRpcException from other Exceptions part of the normal process (not unexpected exceptions)
    if (SecurityException.class.equals(e.getClass()))
    {
      log.error(e.getMessage(), e);
      throw new DkException(new DkExceptionContext(e.getMessage()), e);
    }
    // if we are here that's because handleApplicationSpecificException(e) didn't handle
    // the given exception e. So a unknown exception is thrown.
    log.error(DkException.UNKNWOWN_ERROR_MESSAGE, e);
    throw new DkException(new DkExceptionContext(DkException.UNKNWOWN_ERROR_MESSAGE), e);
  }
View Full Code Here

    throw new DkException(new DkExceptionContext(DkException.UNKNWOWN_ERROR_MESSAGE), e);
  }

  protected void populateException(final DkException exception)
  {
    final DkExceptionContext context = exception.getContext();
    if (context.getCreationDate() == null)
    {
      context.setCreationDate(new Date().toString());
    }
    if (context.getRequest() == null)
    {
      final StringBuffer requestURL = getRequest().getRequestURL();
      if (getRequest().getQueryString() != null)
      {
        requestURL.append("?").append(getRequest().getQueryString());
      }
      final String completeURL = requestURL.toString();
      context.setRequest(completeURL);
    }
    if (context.getLanguageIsoCode() == null)
    {
      context.setLanguageIsoCode(getLanguageIsoCode());
    }
    if (context.getUserLogged() == null)
    {
      context.setUserLogged(getUserLogged());
    }
    context.buildStackTrace(exception);
  }
View Full Code Here

TOP

Related Classes of com.daikit.commons.shared.exception.context.DkExceptionContext

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.