tryCatchLog icon indicating copy to clipboard operation
tryCatchLog copied to clipboard

Examine impact of R 4.0 changes

Open aryoda opened this issue 5 years ago • 1 comments

R 4.0.0 has been released today and brings some changes and features that might impact tryCatchLog.

Examine the impact of the changes...

  • The internal traceback object produced when an error is signalled (.Traceback), now contains the calls rather than the deparse()d calls, deferring the deparsing to the user-level functions .traceback() and traceback(). This fulfils the wish of PR#17580, reported including two patch proposals by Brodie Gaslam.

  • assertError() and assertWarning() (in package tools) can now check for specific error or warning classes via the new optional second argument classes (which is not back compatible with previous use of an unnamed second argument).

  • stopifnot() now allows customizing error messages via argument names, thanks to a patch proposal by Neal Fultz in PR#17688.

  • stopifnot() gets new argument exprObject to allow an R object of class expression (or other 'language') to work more consistently, thanks to suggestions by Suharto Anggono.

  • New globalCallingHandlers() function to establish global condition handlers. This allows registering default handlers for specific condition classes. Developed in collaboration with Lionel Henry.

  • New function tryInvokeRestart() to invoke a specified restart if one is available and return without signaling an error if no such restart is found. Contributed by Lionel Henry in PR#17598.

  • New classes argument for suppressWarnings() and suppressMessages() to selectively suppress only warnings or messages that inherit from particular classes. Based on patch from Lionel Henry submitted with PR#17619.

  • R_withCallingErrorHandler is now available for establishing a calling handler in C code for conditions inheriting from class error.

aryoda avatar Apr 24 '20 19:04 aryoda

Some unit tests for globalCallingHandlers together with tryCatchLog would be nice...

But I suggest to reject and close this issue (nobody complained so far about R 4.0 with tryCatchLog).

aryoda avatar Jul 31 '22 16:07 aryoda