protected void doStop() throws Exception { MultiException mex=new MultiException(); try { super.doStop(); } catch(Throwable e){mex.add(e);} if (_handlers!=null) { for (int i=_handlers.length;i-->0;) try{_handlers[i].stop();}catch(Throwable e){mex.add(e);} } mex.ifExceptionThrow(); }
private MultiException addMultiException(MultiException exception, Exception e) { if (exception == null) { exception = new MultiException(); } exception.add(e); return exception; }
mex=new MultiException(); mex.add(e); if (mex.size()==1) throw new ServletException(mex.getThrowable(0)); else throw new ServletException(mex);
exception.ifExceptionThrow();
MultiException mex = new MultiException(); for (int i=0;handlers!=null && i<handlers.length;i++) mex.add(e); mex.ifExceptionThrowRuntime();
if(ex.size() == 1) { Exception sub = ex.getException(0); if (sub instanceof java.net.BindException) { if(!findPort)
/** * Starts the Jetty server * * @throws Exception on error. */ public void start() throws Exception { System.setProperty("org.mortbay.http.HttpRequest.maxFormContentSize", "0"); // default max is 200k; zero is infinite try { server.start(); } catch (MultiException e) { if (e.getExceptions().size() == 1 && e.getException(0) instanceof BindException) { throw new BindException("Selenium is already running on port " + getPort() + ". Or some other service is." ); } throw e; } shutDownHook = new Thread(new ShutDownHook(this)); shutDownHook.setName("SeleniumServerShutDownHook"); Runtime.getRuntime().addShutdownHook(shutDownHook); }
private MultiException addMultiException(MultiException exception, Exception e) { if(exception == null){ exception = new MultiException(); } exception.add(e); return exception; }
exception.ifExceptionThrow();
protected void doStart() throws Exception { MultiException mex=new MultiException(); if (_handlers!=null) { for (int i=0;i<_handlers.length;i++) try{_handlers[i].start();}catch(Throwable e){mex.add(e);} } super.doStart(); mex.ifExceptionThrow(); }
private MultiException addMultiException(MultiException exception, Exception e) { if(exception == null){ exception = new MultiException(); } exception.add(e); return exception; }
exception.ifExceptionThrow();
protected void doStop() throws Exception MultiException mex=new MultiException(); try{_connectors[i].close();}catch(Throwable e){mex.add(e);} try{_connectors[i].stop();}catch(Throwable e){mex.add(e);} try {super.doStop(); } catch(Throwable e) { mex.add(e);} ((LifeCycle)_threadPool).stop(); catch(Throwable e){mex.add(e);} catch (Throwable e) {mex.add(e);} mex.ifExceptionThrow();
private MultiException addMultiException(MultiException exception, Exception e) { if(exception == null){ exception = new MultiException(); } exception.add(e); return exception; }
exception.ifExceptionThrow();
MultiException mex=new MultiException(); catch (Throwable e) {mex.add(e);} ((LifeCycle)_threadPool).start(); catch(Throwable e) { mex.add(e);} catch(Throwable e) mex.add(e); mex.ifExceptionThrow();
private MultiException addMultiException(MultiException exception, Exception e) { if (exception == null) { exception = new MultiException(); } exception.add(e); return exception; }
exception.ifExceptionThrow();
throws Exception MultiException mx = new MultiException(); if (forced_holder==null || forced_holder.getClassName()==null) mx.add(new IllegalStateException("No forced path servlet for "+servlets[i].getForcedPath())); continue; mx.add(e); mx.ifExceptionThrow();
private MultiException addMultiException(MultiException exception, Exception e) { if(exception == null){ exception = new MultiException(); } exception.add(e); return exception; }