Skip to content
Prev 61560 / 63424 Next

Unique ID for conditions to supress/rethrow selected conditions?

On Sun, 16 Apr 2023 at 12:58, nospam at altfeld-im.de <nospam at altfeld-im.de> wrote:
I don't think so. As stated in the manual, "?simpleError? is the class
used by ?stop? and all internal error signals".
I agree that something like this would be a nice addition. With the
current condition system, it would be certainly easy (but quite a lot
of work) to define a hierarchy of built-in conditions, and then use
them consistently throughout base R. For example,
Error in 1 + "a" : non-numeric argument to binary operator

could be a "typeError". And catching this is already possible:
[1] "hello"