Examples of ExceptionHandler


Examples of org.restlet.ext.jaxrs.internal.util.ExceptionHandler

     */
    public JaxRsRestlet(Context context, MetadataService metadataService) {
        super(context);
        final ExtensionBackwardMapping extensionBackwardMapping = new ExtensionBackwardMapping(
                metadataService);
        this.excHandler = new ExceptionHandler(getLogger());
        this.providers = new JaxRsProviders(this.objectFactory, this.tlContext,
                extensionBackwardMapping, getLogger());
        this.resourceClasses = new ResourceClasses(this.tlContext,
                this.providers, extensionBackwardMapping, getLogger());
        this.loadDefaultProviders();
View Full Code Here

Examples of org.springframework.batch.repeat.exception.ExceptionHandler

  }

  public void testDelegation() throws Throwable {
    final List<String> list = new ArrayList<String>();
    handler.setHandlers(new ExceptionHandler[] {
      new ExceptionHandler() {
                @Override
        public void handleException(RepeatContext context, Throwable throwable) throws RuntimeException {
          list.add("1");
        }
      },
      new ExceptionHandler() {
                @Override
        public void handleException(RepeatContext context, Throwable throwable) throws RuntimeException {
          list.add("2");
        }
      }
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.internal.model.ExceptionHandler

    addButton.setText("Add");
    GridData data1 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    addButton.setLayoutData(data1);
    addButton.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        ExceptionHandler action = new ExceptionHandler();
        action.createNew(parentElement);
        if (DialogUtils.openPropertiesDialog(parentElement, action,
            true) == Dialog.OK) {
          exceptionHandler.add(action);
          configsViewer.refresh();
        }
      }
    });
    editButton = new Button(buttonArea, SWT.PUSH);
    editButton.setText("Edit");
    data1 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    editButton.setLayoutData(data1);
    editButton.addSelectionListener(new SelectionAdapter() {

      public void widgetSelected(SelectionEvent e) {
        IStructuredSelection selection = (IStructuredSelection) configsViewer
            .getSelection();
        if (selection.getFirstElement() != null) {
          if (selection.getFirstElement() instanceof ExceptionHandler) {
            if (DialogUtils.openPropertiesDialog(parentElement,
                (ExceptionHandler) selection.getFirstElement(),
                true) == Dialog.OK) {
              configsViewer.refresh();
            }
          }
        }
      }
    });

    deleteButton = new Button(buttonArea, SWT.PUSH);
    deleteButton.setText("Delete");
    data1 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    deleteButton.setLayoutData(data1);
    deleteButton.addSelectionListener(new SelectionAdapter() {

      public void widgetSelected(SelectionEvent e) {
        IStructuredSelection selection = (IStructuredSelection) configsViewer
            .getSelection();
        if (selection.getFirstElement() != null
            && selection.getFirstElement() instanceof ExceptionHandler) {
          ExceptionHandler actionElement = (ExceptionHandler) selection
              .getFirstElement();
          exceptionHandler.remove(actionElement);
          configsViewer.refresh(true);
        }
      }
View Full Code Here

Examples of org.springframework.web.bind.annotation.ExceptionHandler

   * @return the handled exceptions
   */
  @SuppressWarnings("unchecked")
  protected List<Class<? extends Throwable>> getHandledExceptions(Method method) {
    List<Class<? extends Throwable>> result = new ArrayList<Class<? extends Throwable>>();
    ExceptionHandler exceptionHandler = AnnotationUtils.findAnnotation(method, ExceptionHandler.class);
    if (exceptionHandler != null) {
      if (!ObjectUtils.isEmpty(exceptionHandler.value())) {
        result.addAll(Arrays.asList(exceptionHandler.value()));
      }
      else {
        for (Class<?> param : method.getParameterTypes()) {
          if (Throwable.class.isAssignableFrom(param)) {
            result.add((Class<? extends Throwable>) param);
View Full Code Here

Examples of org.springframework.web.bind.annotation.ExceptionHandler

   */
  @SuppressWarnings("unchecked")
  private List<Class<? extends Throwable>> detectExceptionMappings(Method method) {
    List<Class<? extends Throwable>> result = new ArrayList<Class<? extends Throwable>>();

    ExceptionHandler annotation = AnnotationUtils.findAnnotation(method, ExceptionHandler.class);
    result.addAll(Arrays.asList(annotation.value()));

    if (result.isEmpty()) {
      for (Class<?> paramType : method.getParameterTypes()) {
        if (Throwable.class.isAssignableFrom(paramType)) {
          result.add((Class<? extends Throwable>) paramType);
View Full Code Here

Examples of org.springframework.web.bind.annotation.ExceptionHandler

   * scan the method signature for all arguments of type {@link Throwable}.
   */
  @SuppressWarnings("unchecked")
  private List<Class<? extends Throwable>> detectMappedExceptions(Method method) {
    List<Class<? extends Throwable>> result = new ArrayList<Class<? extends Throwable>>();
    ExceptionHandler annotation = AnnotationUtils.findAnnotation(method, ExceptionHandler.class);
    if (annotation != null) {
      result.addAll(Arrays.asList(annotation.value()));
    }
    if (result.isEmpty()) {
      for (Class<?> paramType : method.getParameterTypes()) {
        if (Throwable.class.isAssignableFrom(paramType)) {
          result.add((Class<? extends Throwable>) paramType);
View Full Code Here

Examples of org.springframework.web.bind.annotation.ExceptionHandler

   * @return the handled exceptions
   */
  @SuppressWarnings("unchecked")
  protected List<Class<? extends Throwable>> getHandledExceptions(Method method) {
    List<Class<? extends Throwable>> result = new ArrayList<Class<? extends Throwable>>();
    ExceptionHandler exceptionHandler = AnnotationUtils.findAnnotation(method, ExceptionHandler.class);
    if (exceptionHandler != null) {
      if (!ObjectUtils.isEmpty(exceptionHandler.value())) {
        result.addAll(Arrays.asList(exceptionHandler.value()));
      }
      else {
        for (Class<?> param : method.getParameterTypes()) {
          if (Throwable.class.isAssignableFrom(param)) {
            result.add((Class<? extends Throwable>) param);
View Full Code Here

Examples of org.vfny.geoserver.ExceptionHandler

        LOGGER.info("Had an undefined error: " + t.getMessage());

        //TODO: put the stack trace in the logger.
        //t.printStackTrace();
        //String pre = "UNCAUGHT EXCEPTION";
        ExceptionHandler exHandler = getExceptionHandler();
        ServiceException se = exHandler.newServiceException(t);

        sendError(response, se);

        //GeoServer geoServer = (GeoServer) this.getServletConfig()
        //                                      .getServletContext().getAttribute(GeoServer.WEB_CONTAINER_KEY);
View Full Code Here

Examples of org.wymiwyg.rwcf.ExceptionHandler

    } catch (ClassNotFoundException e) {
      log.error("omitting exception-handler, could not load "+exceptionClassName);
      return;
    }
    try {
      ExceptionHandler handler = (ExceptionHandler) handlerClass.newInstance();
      handler.init(new HandlerConfigImp(exceptionHandlerRes,
          this));
      exceptionHandlers.put(exceptionClass, handler);
    } catch (InstantiationException e) {
      log.error("omitting exception-handler, could not load "+exceptionClassName, e);
      return;
View Full Code Here

Examples of ptolemy.kernel.util.ExceptionHandler

                        // Note that we allow multiple exception handlers
                        // to handle the same exception. So we iterate all
                        // of the exception handlers, at least until one
                        // those throws an exception.
                        while (exceptionHandlers.hasNext()) {
                            ExceptionHandler exceptionHandler = (ExceptionHandler) exceptionHandlers
                                    .next();
                            if (exceptionHandler.handleException(_container,
                                    initialThrowable)) {
                                exceptionHandled = true;
                            }
                        }
                        if (exceptionHandled) {
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.