/** * Stores the exception which holds information if, and where, the Windup stopped (typically on an external request). * If windup was stopped, this must be called. */ public void setWindupStopException(WindupStopException windupStopException) { if (this.windupStopException != null) throw new WindupException("Trying to set the stop exception while it was already set." + " The cause contains the original one.", this.windupStopException); this.windupStopException = windupStopException; }
public WindupMultiException(String msg, List<Exception> exs) { super(formatMessage(msg, exs, false)); }
public WindupMultiStringException(String msg, List<String> errors) { super(formatMessage(msg, errors)); }
private void checkCancelled(GraphRewrite event) { if (event.shouldWindupStop()) { throw new WindupStopException("Request to stop detected during unzipping of archives"); } }
public static Object executeXPath(Node document, XPathExpression expr, QName result) throws XPathException, MarshallingException { try { return expr.evaluate(document, result); } catch (Exception e) { throw new MarshallingException("Exception unmarshalling XML.", e); } } }
/** * Stores the exception which holds information if, and where, the Windup stopped (typically on an external request). * If windup was stopped, this must be called. */ public void setWindupStopException(WindupStopException windupStopException) { if (this.windupStopException != null) throw new WindupException("Trying to set the stop exception while it was already set." + " The cause contains the original one.", this.windupStopException); this.windupStopException = windupStopException; }
private void checkCancelled(GraphRewrite event) { if (event.shouldWindupStop()) { throw new WindupStopException("Request to stop detected during unzipping of archives"); } }
public WindupMultiException(String msg, List<Exception> exs) { super(formatMessage(msg, exs, false)); }
public WindupMultiStringException(String msg, List<String> errors) { super(formatMessage(msg, errors)); }
private void validateWrappedCondition(Object wrappedCondition) { if(! (wrappedCondition instanceof GraphCondition)) { throw new WindupException("The <" + ELEMENT_NAME + "> element must wrap GraphConditions only." ); } }
public WindupMultiException(String msg, List<Exception> exs) { super(formatMessage(msg, exs, false)); }
public WindupMultiStringException(String msg, List<String> errors) { super(formatMessage(msg, errors)); }
private void validateWrappedCondition(Object wrappedCondition) { if(! (wrappedCondition instanceof GraphCondition)) { throw new WindupException("The <" + ELEMENT_NAME + "> element must wrap GraphConditions only." ); } }
private void validateAttributes(String size) throws WindupException{ if(!Pattern.matches("[0-9]+",size)) { throw new WindupException("The <" + ELEMENT_NAME + "> element's '" +IterableFilterHandler.SIZE_ATTRIBUTE + " attribute is not a valid number." ); } }
private void validateChildren(List<Element> children) throws WindupException{ if(children.size() != 1) { throw new WindupException("The <" + ELEMENT_NAME + "> element must have exactly 1 child." ); } } }
private void validateChildren(List<Element> children) { if(children.size() != 1) { throw new WindupException("The <" + ELEMENT_NAME + "> element must have exactly 1 child." ); } } }
@SuppressWarnings("unchecked") private Class<? extends WindupVertexFrame> cast(Class<? extends WindupFrame> typeAsWindupFrame) { if (!WindupVertexFrame.class.isAssignableFrom(typeAsWindupFrame)) throw new WindupException("Only types that are a subclass of " + WindupVertexFrame.class.getCanonicalName() + " are supported by the " + ELEMENT_NAME + " element!"); return (Class<? extends WindupVertexFrame>) typeAsWindupFrame; } }
@SuppressWarnings("unchecked") private Class<? extends WindupVertexFrame> cast(Class<? extends WindupFrame> typeAsWindupFrame) { if (!WindupVertexFrame.class.isAssignableFrom(typeAsWindupFrame)) throw new WindupException("Only types that are a subclass of " + WindupVertexFrame.class.getCanonicalName() + " are supported by the " + ELEMENT_NAME + " element!"); return (Class<? extends WindupVertexFrame>) typeAsWindupFrame; } }
public Tag getTag(String tagName) { Tag tag = findTag(tagName); if (null == tag) throw new WindupException("Tag does not exist: " + tagName); return tag; }
public Tag getTag(String tagName) { Tag tag = findTag(tagName); if (null == tag) throw new WindupException("Tag does not exist: " + tagName); return tag; }