Closed brodieG closed 3 years ago
Might it be possible to capture the browser exist signal too?
Update: no, it doesn't seem so. Q just calls jump_to_top_level
.
This seems to work:
time <- Sys.time()
time2
withRestarts(
withCallingHandlers({
readline('hello')
},
interrupt = function(e) {
time2 <<- Sys.time()
invokeRestart('interrupted')
}
),
interrupted=function(e) readline('hi again')
)
Based on:
https://milesmcbain.micro.blog/2021/06/10/debugging-cantrip-from.html
https://twitter.com/LukeTierney4/status/1402975719286738944?s=20