/** * Constructs a <code>JAXRException</code> object with the given * <code>String</code> as the reason for the exception being thrown * and the given <code>Throwable</code> object as an embedded * Throwable. * * @param reason a description of what caused the exception * @param cause a <code>Throwable</code> object that is to * be embedded in this <code>JAXRException</code> object */ public UnexpectedObjectException(String reason, Throwable cause) { super (reason); initCause(cause); }
public void addSpecificationLinks(Collection col) throws JAXRException { try { Iterator iter = col.iterator(); while(iter.hasNext()) { addSpecificationLink((SpecificationLink)iter.next()); } } catch (ClassCastException e) { throw new UnexpectedObjectException(); } }
/** * Constructs a <code>JAXRException</code> object with the given * <code>String</code> as the reason for the exception being thrown * and the given <code>Throwable</code> object as an embedded * Throwable. * * @param reason a description of what caused the exception * @param cause a <code>Throwable</code> object that is to * be embedded in this <code>JAXRException</code> object */ public UnexpectedObjectException(String reason, Throwable cause) { super (reason); initCause(cause); }
public void addServiceBindings(Collection col) throws JAXRException { try{ Iterator iter = col.iterator(); while(iter.hasNext()) { addServiceBinding((ServiceBinding)iter.next()); } }catch(ClassCastException ce) { throw new UnexpectedObjectException(ce.getLocalizedMessage()); } }
/** * Constructs a <code>JAXRException</code> object initialized * with the given <code>Throwable</code> object. * * @param cause the Throwable that caused this Exception */ public UnexpectedObjectException(Throwable cause) { super (cause.toString()); initCause(cause); } }
/** * Constructs a <code>JAXRException</code> object initialized * with the given <code>Throwable</code> object. * * @param cause the Throwable that caused this Exception */ public UnexpectedObjectException(Throwable cause) { super (cause.toString()); initCause(cause); } }