search for: caugh

Displaying 1 result from an estimated 1 matches for "caugh".

Did you mean: caught
2004 Jun 10
1
tryCatch() and preventing interrupts in 'finally'
...urces etc. However, how can I "protect" against additional interrupts? This is a concern when the hold down Ctrl+C and generates a sequence of interrupts. Example: tryCatch({ cat("Press Ctrl+C...\n"); Sys.sleep(5); }, interrupt = function(interrupt) { # ...and it will get caught cat("Caugh an interrupt:\n"); print(interrupt); }, finally = { cat("Trying to finalize. Press Ctrl+C...\n"); Sys.sleep(5); cat("...and this line will not be evaluated.\n"); }) Additional tryCatch() inside 'finally' will have the same problem and so....