java.lang.AssertionError.fillInStackTrace()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(142)

本文整理了Java中java.lang.AssertionError.fillInStackTrace()方法的一些代码示例,展示了AssertionError.fillInStackTrace()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AssertionError.fillInStackTrace()方法的具体详情如下:
包路径:java.lang.AssertionError
类名称:AssertionError
方法名:fillInStackTrace

AssertionError.fillInStackTrace介绍

暂无

代码示例

代码示例来源:origin: org.easymock/easymock

@Override
public void verifyUnexpectedCalls() {
  try {
    state.verifyUnexpectedCalls();
  } catch (RuntimeExceptionWrapper e) {
    throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
  } catch (AssertionErrorWrapper e) {
    throw (AssertionError) e.getAssertionError().fillInStackTrace();
  }
}

代码示例来源:origin: org.easymock/easymock

@Override
public void verify() {
  try {
    state.verify();
  } catch (RuntimeExceptionWrapper e) {
    throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
  } catch (AssertionErrorWrapper e) {
    throw (AssertionError) e.getAssertionError().fillInStackTrace();
  }
}

代码示例来源:origin: org.easymock/easymock

@Override
public void verifyRecording() {
  try {
    state.verifyRecording();
  } catch (RuntimeExceptionWrapper e) {
    throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
  } catch (AssertionErrorWrapper e) {
    throw (AssertionError) e.getAssertionError().fillInStackTrace();
  }
}

代码示例来源:origin: goldmansachs/gs-collections

e.fillInStackTrace();
StackTraceElement[] stackTrace = e.getStackTrace();
StackTraceElement[] newStackTrace = new StackTraceElement[stackTrace.length - framesToPop];

代码示例来源:origin: eclipse/eclipse-collections

e.fillInStackTrace();
StackTraceElement[] stackTrace = e.getStackTrace();
StackTraceElement[] newStackTrace = new StackTraceElement[stackTrace.length - framesToPop];

代码示例来源:origin: org.easymock/easymock

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
}

代码示例来源:origin: easymock/easymock

public void verify() {
  try {
    state.verify();
  } catch (RuntimeExceptionWrapper e) {
    throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
  } catch (AssertionErrorWrapper e) {
    throw (AssertionError) e.getAssertionError().fillInStackTrace();
  }
}

代码示例来源:origin: org.eclipse.collections/eclipse-collections-testutils

e.fillInStackTrace();
StackTraceElement[] stackTrace = e.getStackTrace();
StackTraceElement[] newStackTrace = new StackTraceElement[stackTrace.length - framesToPop];

代码示例来源:origin: com.goldmansachs/gs-collections-testutils

e.fillInStackTrace();
StackTraceElement[] stackTrace = e.getStackTrace();
StackTraceElement[] newStackTrace = new StackTraceElement[stackTrace.length - framesToPop];

代码示例来源:origin: org.easymock/com.springsource.org.easymock

public void verify() {
  try {
    state.verify();
  } catch (RuntimeExceptionWrapper e) {
    throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
  } catch (AssertionErrorWrapper e) {
    throw (AssertionError) e.getAssertionError().fillInStackTrace();
  }
}

代码示例来源:origin: easymock/easymock

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();
  }
}

代码示例来源:origin: org.easymock/com.springsource.org.easymock

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
  }
}

相关文章