Hmm. I’m trying to do something like we discussed,...
# strikt
r
Hmm. I’m trying to do something like we discussed, e.g.:
Copy code
expectThat(catching<NullPointerException> { /* whatever */ }).isA<NullPointerException>()
but implementing that
catching
method is not possible, I don’t think. It needs to return the exception (declaring the exception type) but there’s nothing it can sensibly return when either nothing is thrown by the block or the wrong type is thrown.