assertj / assertj/assertj-swing

Improve GuiActionRunner

Open
#242 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
121
Forks
52
PR merge metrics
No merged PRs in 30d

Description

At the end of GuiActionRunner there is the following code:
```java
if (caughtException instanceof RuntimeException) {
appendStackTraceInCurrentThreadToThrowable(caughtException, "execute");
throw (RuntimeException) caughtException;
}
if (caughtException instanceof Error) {
caughtException.fillInStackTrace();
throw (Error) caughtException;
}
```
I think it is not reasonable to fill in the stack trace for the Errors, throwing away the original stack trace: Errors should be treated the same as RuntimeExceptions. Or - if there is some reason for doing so - then at least don't throw away the stack trace of AssertionErrors, they are normal and expected during testing.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.