Using tryCatchLog without attaching the package produces an error:
tryCatchLog::tryCatchLog({
stop("stop")
})
#> Error in h(simpleError(msg, call)): attempt to apply non-function
This is not ideal when using tryCatchLog in a script, and a real problem when using it inside a package. It forces the package author to specify the dependency using Depends: in the DESCRIPTION file, which should be avoided as it modifies the search path (see http://r-pkgs.had.co.nz/namespace.html#namespace for example).
Please consider rewriting the .onAttach function such that your package can be used without having to attach it.
And thank you for your work. Having access to the full stack trace inside tryCatch blocks is much appreciated.
Using
tryCatchLogwithout attaching the package produces an error:This is not ideal when using
tryCatchLogin a script, and a real problem when using it inside a package. It forces the package author to specify the dependency usingDepends:in theDESCRIPTIONfile, which should be avoided as it modifies the search path (see http://r-pkgs.had.co.nz/namespace.html#namespace for example).Please consider rewriting the
.onAttachfunction such that your package can be used without having to attach it.And thank you for your work. Having access to the full stack trace inside
tryCatchblocks is much appreciated.