@Override public void verifyUnexpectedCalls() { try { state.verifyUnexpectedCalls(); } catch (RuntimeExceptionWrapper e) { throw (RuntimeException) e.getRuntimeException().fillInStackTrace(); } catch (AssertionErrorWrapper e) { throw (AssertionError) e.getAssertionError().fillInStackTrace(); } }
@Override public void verify() { try { state.verify(); } catch (RuntimeExceptionWrapper e) { throw (RuntimeException) e.getRuntimeException().fillInStackTrace(); } catch (AssertionErrorWrapper e) { throw (AssertionError) e.getAssertionError().fillInStackTrace(); } }
@Override public void verifyRecording() { try { state.verifyRecording(); } catch (RuntimeExceptionWrapper e) { throw (RuntimeException) e.getRuntimeException().fillInStackTrace(); } catch (AssertionErrorWrapper e) { throw (AssertionError) e.getAssertionError().fillInStackTrace(); } }
e.fillInStackTrace(); StackTraceElement[] stackTrace = e.getStackTrace(); StackTraceElement[] newStackTrace = new StackTraceElement[stackTrace.length - framesToPop];
e.fillInStackTrace(); StackTraceElement[] stackTrace = e.getStackTrace(); StackTraceElement[] newStackTrace = new StackTraceElement[stackTrace.length - framesToPop];
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { if (control.getState() instanceof RecordState) { LastControl.reportLastControl(control); } return control.getState().invoke(new Invocation(proxy, method, args)); } catch (RuntimeExceptionWrapper e) { throw e.getRuntimeException().fillInStackTrace(); } catch (AssertionErrorWrapper e) { throw e.getAssertionError().fillInStackTrace(); } catch (ThrowableWrapper t) { throw t.getThrowable().fillInStackTrace(); } // then let all unwrapped exceptions pass unmodified }
public void verify() { try { state.verify(); } catch (RuntimeExceptionWrapper e) { throw (RuntimeException) e.getRuntimeException().fillInStackTrace(); } catch (AssertionErrorWrapper e) { throw (AssertionError) e.getAssertionError().fillInStackTrace(); } }
e.fillInStackTrace(); StackTraceElement[] stackTrace = e.getStackTrace(); StackTraceElement[] newStackTrace = new StackTraceElement[stackTrace.length - framesToPop];
e.fillInStackTrace(); StackTraceElement[] stackTrace = e.getStackTrace(); StackTraceElement[] newStackTrace = new StackTraceElement[stackTrace.length - framesToPop];
public void verify() { try { state.verify(); } catch (RuntimeExceptionWrapper e) { throw (RuntimeException) e.getRuntimeException().fillInStackTrace(); } catch (AssertionErrorWrapper e) { throw (AssertionError) e.getAssertionError().fillInStackTrace(); } }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { if (control.getState() instanceof RecordState) { LastControl.reportLastControl(control); } return control.getState().invoke( new Invocation(proxy, method, args)); } catch (RuntimeExceptionWrapper e) { throw e.getRuntimeException().fillInStackTrace(); } catch (AssertionErrorWrapper e) { throw e.getAssertionError().fillInStackTrace(); } catch (ThrowableWrapper t) { throw t.getThrowable().fillInStackTrace(); } }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { if (control.getState() instanceof RecordState) { LastControl.reportLastControl(control); } return control.getState().invoke( new Invocation(proxy, method, args)); } catch (RuntimeExceptionWrapper e) { throw e.getRuntimeException().fillInStackTrace(); } catch (AssertionErrorWrapper e) { throw e.getAssertionError().fillInStackTrace(); } catch (ThrowableWrapper t) { throw t.getThrowable().fillInStackTrace(); } catch (Throwable t) { throw t; // let all unwrapped pass unmodified } }