> R will often do something instead of explicitly failing.
I mentioned exception handling above, but this is more specifically the problem.
I think it's a hard problem to solve, because the behaviour of older libraries is so varied.
I have sometimes thought that something like a try catch wrapper which pattern matched or tested the value returned would be useful.