/** * Create a naming exception with a root cause. * * @param message the message * @param cause the cause, or {@code null} for none * @return the naming exception */ public static NamingException namingException(final String message, final Throwable cause) { final NamingException namingException = new NamingException(message); if (cause != null) { namingException.setRootCause(cause); } return namingException; } }
} catch (InstantiationException | IllegalAccessException e) { NamingException ne = new NamingException(className); ne.setRootCause(e); throw ne; } catch (Exception e) {
ne.setRootCause(e); throw ne; } finally { ne.setRootCause(e); throw ne;
/** * Get the next batch using _bindingIter. Update the 'more' field. */ private boolean getMore() throws NamingException { try { more = _bindingIter.next_n(batchsize, _bindingList); counter = 0; // reset } catch (Exception e) { more = false; NamingException ne = IIOPLogger.ROOT_LOGGER.errorGettingBindingList(); ne.setRootCause(e); throw ne; } return more; }
private void setOrbAndRootContext(ORB orb, org.omg.CORBA.Object ncRef) throws NamingException { _orb = orb; try { _nc = NamingContextHelper.narrow(ncRef); if (_nc == null) { throw IIOPLogger.ROOT_LOGGER.errorConvertingIORToNamingCtx(ncRef.toString()); } } catch (org.omg.CORBA.COMM_FAILURE e) { NamingException ne = IIOPLogger.ROOT_LOGGER.errorConnectingToORB(); ne.setRootCause(e); throw ne; } }
private static javax.naming.Context getContinuationContext(CannotProceedException cpe) throws NamingException { try { return NamingManager.getContinuationContext(cpe); } catch (CannotProceedException e) { java.lang.Object resObj = e.getResolvedObj(); if (resObj instanceof Reference) { Reference ref = (Reference) resObj; RefAddr addr = ref.get("nns"); if (addr.getContent() instanceof javax.naming.Context) { NamingException ne = IIOPLogger.ROOT_LOGGER.noReferenceFound(); ne.setRootCause(cpe.getRootCause()); throw ne; } } throw e; } }
ne.setRootCause(in); throw ne; } catch (org.omg.CORBA.COMM_FAILURE e) { NamingException ne = IIOPLogger.ROOT_LOGGER.errorConnectingToORB(); ne.setRootCause(e); throw ne; } catch (org.omg.CORBA.BAD_PARAM e) { NamingException ne = IIOPLogger.ROOT_LOGGER.invalidURLOrIOR(ncIor); ne.setRootCause(e); throw ne; } catch (org.omg.CORBA.INV_OBJREF e) { NamingException ne = IIOPLogger.ROOT_LOGGER.invalidObjectReference(ncIor); ne.setRootCause(e); throw ne;
NamingException ne = new NotContextException(name.toString()); ne.setRootCause(e); throw ne;
ne.setRootCause( e ); throw ne; ne.setRootCause( e ); throw ne;
ne.setRootCause( e ); throw ne; ne.setRootCause( e ); throw ne; ne.setRootCause( e ); throw ne;
} catch (Exception e) { NamingException ne = IIOPLogger.ROOT_LOGGER.errorGeneratingObjectViaFactory(); ne.setRootCause(e); throw ne;
} catch (Exception e) { NamingException ne = IIOPLogger.ROOT_LOGGER.errorGeneratingObjectViaFactory(); ne.setRootCause(e); throw ne;
ne.setRootCause(e); throw ne; } catch (Exception e) {
ne.setRootCause(e); return ne;
ne.setRootCause(e); throw ne; } catch (Exception ge) { NamingException ne = IIOPLogger.ROOT_LOGGER.errorGeneratingObjectViaFactory(); ne.setRootCause(ge); throw ne;
ne.setRootCause( e ); throw ne; ne.setRootCause( e ); throw ne;
ne.setRootCause( e ); throw ne; ne.setRootCause( e ); throw ne;
/** * Creates an InterceptorException without a message. * * @param interceptor the Interceptor causing the failure * @param explanation String explanation of why the Interceptor failed * @param rootCause the root cause of this exception */ public InterceptorException(Interceptor interceptor, String explanation, Throwable rootCause) { this( interceptor, explanation ); super.setRootCause( rootCause ); }
/** * Creates an InterceptorException without a message. * * @param interceptor the Interceptor causing the failure * @param rootCause the root cause of this exception */ public InterceptorException(Interceptor interceptor, Throwable rootCause) { this( interceptor ); super.setRootCause( rootCause ); }
public void start() throws Exception { super.start(); try{ NonSerializableFactory.rebind(ctx, jndiName + PROXY_FACTORY_NAME, this); } catch (NamingException e) { NamingException namingException = new NamingException("Could not bind local producer factory with name " + factoryName + " into JNDI under jndiName: " + ctx.getNameInNamespace() + "/" + jndiName + PROXY_FACTORY_NAME); namingException.setRootCause(e); throw namingException; } }