List of usage examples for java.lang Error setStackTrace
public void setStackTrace(StackTraceElement[] stackTrace)
From source file:com.qmetry.qaf.automation.step.StringTestStep.java
@Override public Object execute() { if (DryRunAnalyzer.isDryRun(this)) { return null; }/*from w w w . ja va 2s . com*/ initStep(); if (null != step) { Object retVal = null; try { retVal = step.execute(); if (isNotBlank(resultParameterName)) { if (resultParameterName.indexOf("${") == 0) { getBundle().setProperty(resultParameterName, retVal); } else { getBundle().setProperty("${" + resultParameterName + "}", retVal); } } } catch (Error ae) { StepInvocationException se = new StepInvocationException(this, ae); ae.setStackTrace(se.getStackTrace()); throw ae; } catch (Throwable e) { StepInvocationException se = new StepInvocationException(this, e); RuntimeException re = (RuntimeException.class.isAssignableFrom(e.getClass()) ? (RuntimeException) e : new RuntimeException(e)); re.setStackTrace(se.getStackTrace()); throw re; } return retVal; } throw new StepNotFoundException(this); }