Examples of ExceptionHandler


Examples of jsky.util.ExceptionHandler

     */
    public static void error(Component parentComponent, Exception e) {
        if (_exceptionHandlerList != null && _exceptionHandlerList.size() != 0) {
            Iterator it = _exceptionHandlerList.listIterator();
            while (it.hasNext()) {
                ExceptionHandler handler = (ExceptionHandler) it.next();
                if (handler.handleException(e)) {
                    return;
                }
            }
        }

View Full Code Here

Examples of net.greghaines.jesque.worker.ExceptionHandler

    }

    @Test
    public void testSetExceptionHandler() {
        final AdminImpl admin = new AdminImpl(CONFIG);
        final ExceptionHandler handler = new ExceptionHandler(){

            /**
             * {@inheritDoc}
             */
            @Override
View Full Code Here

Examples of net.sf.urlchecker.exception.handling.ExceptionHandler

        if (executionCount >= CommunicationFactory.getInstance()
                .getMaxretries()) {
            // Do not retry if over max retry count
            return false;
        }
        final ExceptionHandler handler = CommunicationFactory.getInstance()
                .getExceptionHandlers().get(exception.getClass().getName());
        if (null != handler) {
            return handler.handle(method, exception, executionCount);
        }
        if (!method.isRequestSent()) {
            // Retry if the request has not been sent fully or
            // if it's OK to retry methods that have been sent
            return true;
View Full Code Here

Examples of net.sourceforge.fullsync.ExceptionHandler

    display = Display.getDefault();
    imageRepository = new ImageRepository(display);
    fontRepository = new FontRepository(display);
    createMainShell(minimized);
    systemTrayItem = new SystemTrayItem(this);
    oldExceptionHandler = ExceptionHandler.registerExceptionHandler(new ExceptionHandler() {
      @Override
      protected void doReportException(final String message, final Throwable exception) {
        exception.printStackTrace();

        display.syncExec(new Runnable() {
View Full Code Here

Examples of org.agilewiki.jactor.ExceptionHandler

public class Driver extends JLPCActor implements GoReceiver {
    public Actor doer;

    @Override
    public void processRequest(final Go1 request, final RP rp) throws Exception {
        setExceptionHandler(new ExceptionHandler() {
            @Override
            public void process(final Throwable exception) throws Exception {
                System.out.println("Exception caught by Driver");
                rp.processResponse(null);
            }
View Full Code Here

Examples of org.allspice.bytecode.ExceptionHandler

    createTryCatch(newContext, statements, catchBlocks,l) ;
    l.add(new Nop(end_pc)) ;
    l.add(new JumpSub(finallyMark)) ;
    l.add(new Goto(the_end)) ;
    {
      l.add(new ExceptionHandler(start_pc,end_pc,handler,TypeName.THROWABLE)) ;
      l.add(new Nop(handler)) ;
      l.add(new Store(ex)) ;
      l.add(new JumpSub(finallyMark)) ;
      l.add(new Load(ex)) ;
      l.add(new Throw()) ;
View Full Code Here

Examples of org.apache.camel.spi.ExceptionHandler

    }

    public void testAggregateHandleFailedExchange() throws Exception {
        final AtomicBoolean tested = new AtomicBoolean();

        ExceptionHandler myHandler = new ExceptionHandler() {
            public void handleException(Throwable exception) {
            }

            public void handleException(String message, Throwable exception) {
            }
View Full Code Here

Examples of org.apache.camel.spi.ExceptionHandler

    }

    public void testAggregateHandleFailedExchange() throws Exception {
        final AtomicBoolean tested = new AtomicBoolean();

        ExceptionHandler myHandler = new ExceptionHandler() {
            public void handleException(Throwable exception) {
            }

            public void handleException(String message, Throwable exception) {
            }
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.ui.ExceptionHandler

                            out.flush();
                            out.close();
                        }
                        catch ( FileNotFoundException e )
                        {
                            new ExceptionHandler().handleException( new Status( IStatus.ERROR,
                                BrowserUIPlugin.PLUGIN_ID, IStatus.ERROR, "Can't write to file", e ) );
                        }
                        catch ( IOException e )
                        {
                            new ExceptionHandler().handleException( new Status( IStatus.ERROR,
                                BrowserUIPlugin.PLUGIN_ID, IStatus.ERROR, "Can't write to file", e ) );
                        }
                    }
                }
            } );
View Full Code Here

Examples of org.apache.hadoop.hdfs.web.resources.ExceptionHandler

          //     java.lang.SecurityException: Failed to obtain user group
          //     information: org.apache.hadoop.security.token.
          //     SecretManager$InvalidToken: StandbyException
          //
          HttpServletResponse response = mock(HttpServletResponse.class);
          ExceptionHandler eh = new ExceptionHandler();
          eh.initResponse(response);
         
          // The Response (resp) below is what the server will send to client         
          //
          // BEFORE HDFS-6475 fix, the resp.entity is
          //     {"RemoteException":{"exception":"SecurityException",
          //      "javaClassName":"java.lang.SecurityException",
          //      "message":"Failed to obtain user group information:
          //      org.apache.hadoop.security.token.SecretManager$InvalidToken:
          //        StandbyException"}}
          // AFTER the fix, the resp.entity is
          //     {"RemoteException":{"exception":"StandbyException",
          //      "javaClassName":"org.apache.hadoop.ipc.StandbyException",
          //      "message":"Operation category READ is not supported in
          //       state standby"}}
          //
          Response resp = eh.toResponse(oe);
         
          // Mimic the client side logic by parsing the response from server
          //
          Map<?, ?> m = (Map<?, ?>)JSON.parse(resp.getEntity().toString());
          RemoteException re = JsonUtil.toRemoteException(m);
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.