Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Potentially misleading behavior of shoudNotThrow #217

Open
piotrb5e3 opened this issue Oct 14, 2022 · 0 comments
Open

Potentially misleading behavior of shoudNotThrow #217

piotrb5e3 opened this issue Oct 14, 2022 · 0 comments

Comments

@piotrb5e3
Copy link
Contributor

I think shouldNotThrow could hide a programming error.

The following code completes without issues:

invoking { throw IllegalArgumentException() } shouldNotThrow CustomException::class

I think the IllegalArgumentException should be re-thrown so it's not hidden from the developer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant