Kluent icon indicating copy to clipboard operation
Kluent copied to clipboard

Potentially misleading behavior of shoudNotThrow

Open piotrb5e3 opened this issue 2 years ago • 0 comments

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.

piotrb5e3 avatar Oct 14 '22 15:10 piotrb5e3