@Override public void handle(HttpExchange ex) throws IOException { try { delegate.handle(new HttpExchangeDelegate(ex)); } catch (IOException e) { e.printStackTrace(); throw e; } catch (RuntimeException e) { e.printStackTrace(); throw e; } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e); } }
@Override public void handle(HttpExchange ex) throws IOException { ClassLoader origClassLoader = SecurityActions.getContextClassLoader(); try { SecurityActions.setContextClassLoader(this.classLoader); this.handle(new HttpExchangeDelegate(ex)); } catch (Exception e) { LOG.throwing(Handler.class.getName(), "handle(" + HttpExchange.class.getName() + " ex)", e); if (e instanceof IOException) { throw (IOException) e; } else { throw new RuntimeException(e); } } finally { SecurityActions.setContextClassLoader(origClassLoader); } } }
this.handle(new HttpExchangeDelegate(ex));
this.handle(new HttpExchangeDelegate(ex));