assertj-swing icon indicating copy to clipboard operation
assertj-swing copied to clipboard

Improve GuiActionRunner

Open lbalazscs opened this issue 7 years ago • 0 comments

At the end of GuiActionRunner there is the following code:

    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.

lbalazscs avatar Nov 20 '19 14:11 lbalazscs