Examples of ApplicationException


Examples of org.apache.shale.view.ApplicationException

        // rendering to complete, while simulating container error handling
        try {
            // Set up request attributes reflecting the error conditions,
            // similar to what is passed to an error handler by the servlet
            // container (see Section 9.9.1 of the Servlet Specification)
            ApplicationException exception = new ApplicationException(list);
            Map map = econtext.getRequestMap();
            map.put("javax.servlet.error.status_code", new Integer(HTTP_STATUS)); // Not an HTTP error
            map.put("javax.servlet.error.exception_type", ApplicationException.class);
            map.put("javax.servlet.error.message", exception.getMessage());
            map.put("javax.servlet.error.exception", exception);
            StringBuffer sb = new StringBuffer("");
            if (econtext.getRequestServletPath() != null) {
                sb.append(econtext.getRequestServletPath());
            }
View Full Code Here

Examples of org.butor.utils.ApplicationException

  protected String buildKey(String methodName_, int nbArgs_) {
    return String.format("%s.%d", methodName_, nbArgs_);
  }
  protected void handleException(final ResponseHandler<?> handler, String serviceName, Throwable e) {
    if (e instanceof ApplicationException) {
      ApplicationException appEx = (ApplicationException)e;
      _logger.warn(String.format("Failed to invoke service e=%s, cmp=%s",
          serviceName, targetCmp.getClass().getName()), appEx);
      for (Message message : appEx.getMessages()) {
        handler.addMessage(message);
      }
     
    } else {
      _logger.error(String.format("Failed to invoke service=%s, cmp=%s",
View Full Code Here

Examples of org.fenrir.yggdrasil.core.exception.ApplicationException

  {
    try{
      ApplicationWindowManager.getInstance().createWindow();
    }
    catch(Exception e){
      throw new ApplicationException("S'ha produit un error durant la creació de la finestra principal", e);
    }
  }
View Full Code Here

Examples of org.ita.capes.ApplicationException

          aux.setCep("");
          aux.setCidade("");
          aux.setEstado("");
          aux.setHomepage("");
          List<IefInfoTela> auxLista = iefInfoTelaDAO.query(aux);
          if(auxLista.size()>1) throw new ApplicationException("Mais de um IefInfoTela com num "+aux.getNum());
          else if(auxLista.size()==0) throw new ApplicationException("Sem elemento IefInfoTela com num "+aux.getNum());
          else {
            //todas informacoes que nao sao setadas em corrente
            handler.getCorrente().setIdIef(auxLista.get(0).getIdIef());
            handler.getCorrente().setLatitude(auxLista.get(0).getLatitude());
            handler.getCorrente().setLongitude(auxLista.get(0).getLongitude());
View Full Code Here

Examples of org.jboss.resteasy.spi.ApplicationException

         {
            throw new InternalServerErrorException(e);
         }
         catch (InvocationTargetException e)
         {
            throw new ApplicationException(e);
         }
      }
   }
View Full Code Here

Examples of org.jboss.resteasy.spi.ApplicationException

         {
            throw new RuntimeException(e);
         }
         catch (InvocationTargetException e)
         {
            throw new ApplicationException(e.getCause());
         }
      }
View Full Code Here

Examples of org.jboss.resteasy.spi.ApplicationException

         if (cause instanceof WebApplicationException)
         {
            WebApplicationException wae = (WebApplicationException) cause;
            throw wae;
         }
         throw new ApplicationException(cause);
      }
      catch (IllegalArgumentException e)
      {
         String msg = "Bad arguments passed to " + method.toString() + "  (";
         if (args != null)
View Full Code Here

Examples of org.jboss.resteasy.spi.ApplicationException

      {
         throw new InternalServerErrorException(e);
      }
      catch (InvocationTargetException e)
      {
         throw new ApplicationException(e.getCause());
      }
   }
View Full Code Here

Examples of org.nasutekds.quicksetup.ApplicationException

                    directive.getMessage());
            reason.append(directive.getMessage());
            reason.append(EOL);
          }
        }
        throw new ApplicationException(
            ReturnCode.APPLICATION_ERROR,
                INFO_REVERSION_ORACLE_UNSUPPORTED.get(
                        currentBuildInfo.toString(),
                        newBuildInfo.toString(),
                        reason.toMessage()),
                null);
      } else {
        if (ui != null) {
          for (Directive directive : issues) {
            Message title;
            Message summary;
            Message details;
            Message defaultAction;
            UserInteraction.MessageType msgType;
            String lineBreak = ui.isCLI() ?
                Constants.LINE_SEPARATOR : Constants.HTML_LINE_BREAK;
            switch (directive.getType()) {
              case ACTION:
                title = INFO_GENERAL_ACTION_REQUIRED.get();
                summary = INFO_REVERSION_ORACLE_ACTION.get();
                details = new MessageBuilder(directive.getMessage())
                        .append(lineBreak)
                        .append(lineBreak)
                        .append(INFO_ORACLE_ACTION_PROMPT.get())
                        .toMessage();
                msgType = UserInteraction.MessageType.WARNING;
                defaultAction = cancel;
                break;
              case INFO:
                title = INFO_GENERAL_INFO.get();
                summary = INFO_REVERSION_ORACLE_INFO.get();
                details = new MessageBuilder(directive.getMessage())
                        .append(lineBreak)
                        .append(lineBreak)
                        .append(INFO_ORACLE_INFO_PROMPT.get())
                        .toMessage();
                msgType = UserInteraction.MessageType.INFORMATION;
                defaultAction = cont;
                break;
              case WARNING:
                title = INFO_GENERAL_WARNING.get();
                summary = INFO_REVERSION_ORACLE_WARNING.get();
                details = new MessageBuilder(directive.getMessage())
                        .append(lineBreak)
                        .append(lineBreak)
                        .append(INFO_ORACLE_INFO_PROMPT.get())
                        .toMessage();
                msgType = UserInteraction.MessageType.WARNING;
                defaultAction = cont;
                break;
              default:
                LOG.log(Level.INFO, "Unexpected issue type " +
                        directive.getType());
                title = Message.EMPTY;
                summary = Message.EMPTY;
                details = directive.getMessage();
                msgType = UserInteraction.MessageType.WARNING;
                defaultAction = cont;
            }
            if (cancel.equals(ui.confirm(
                    summary,
                    details,
                    title,
                    msgType,
                    new Message[]{cont, cancel},
                    defaultAction))) {
              throw new ApplicationException(
                  ReturnCode.CANCELED,
                      INFO_REVERSION_CANCELED.get(), null);
            }
          }
        } else {
          throw new ApplicationException(
              ReturnCode.APPLICATION_ERROR,
              INFO_ORACLE_NO_SILENT.get(), null);
        }
      }
    }
View Full Code Here

Examples of org.omg.CORBA.portable.ApplicationException

                }
                catch( java.io.IOException e )
                {
                    throw new INTERNAL("should never happen: " + e.toString());
                }
                return new ApplicationException( id, this );
            }
            case ReplyStatusType_1_2._SYSTEM_EXCEPTION:
            {
                return SystemExceptionHelper.read( this );
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.