Skip to content

Commit

Permalink
fix: throw exception immediately (#3558)
Browse files Browse the repository at this point in the history
It seems recently the functionality for throwsExceptionImmediately has changed, a new thread local was created but it seems it was not used
  • Loading branch information
grijeshsaini authored Oct 19, 2024
1 parent 9876839 commit c3a2942
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public static void throwExceptionsImmediately() {
public static boolean shouldThrowErrorsImmediately() {
// Throw errors immediately if this is a Cucumber test
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
return Arrays.stream(stackTrace).anyMatch(element -> element.getClassName().contains("io.cucumber.core"));
return throwExceptionsImmediately.get() || Arrays.stream(stackTrace).anyMatch(element -> element.getClassName().contains("io.cucumber.core"));
}

public static WebDriverConfigurer webdriver() {
Expand Down

0 comments on commit c3a2942

Please sign in to comment.