Comments (2)
withCallingHandlers()
will still error, so that's not good IMO. You need to tryCatch
and print the error, no?
Also, I don't think the local_ version is possible. You can't really define handlers that are local to the calling function, can you? You can define global top level ones, but they are undocumented, AFAIR, and have several issues.
from withr.
I was thinking something like withCallingHandlers(error = identity)
, but it would have to be a global environment.
Anyway apparently it seems you can do something like
\dontshow{try(}
code
\dontshow{)}
So this seems to be unnecessary.
from withr.
Related Issues (20)
- with_s3_method HOT 2
- Bind `done` to `deferred_run()` HOT 1
- Use `Sys.setlanguage()` in `local_language` HOT 1
- Unclear usage of `local_tempfile` HOT 2
- withr not working properly in pkgdown examples HOT 3
- `with_options` differs from `options()` HOT 2
- Should deferred_run() work within knitr? HOT 4
- Failing test in test suite HOT 6
- `get_par` ignores `no.readonly`
- Use standalone check functions
- `local_pdf()` and friends should default to using a local temporary file
- withr `3.0.0` breaking gh actions HOT 3
- Warnings when running tests using withr HOT 4
- local_tempfile() fails to close the connection when used in examples with lines= HOT 4
- `deferred_run` doesn't find attached handlers HOT 1
- "replace" is prefixing in `with_temp_libpaths` and friends
- Usage instructions for with_tempdir is unclear
- local_package() used in a function detaches package from global environment HOT 1
- with_package does not clean up Depends
- Update knitr defer code after evaluate 1.0.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from withr.