Skip to content

Instantly share code, notes, and snippets.

@hadley
Created September 10, 2015 14:52
Show Gist options
  • Select an option

  • Save hadley/f8ac6e273853a06ac7fa to your computer and use it in GitHub Desktop.

Select an option

Save hadley/f8ac6e273853a06ac7fa to your computer and use it in GitHub Desktop.
run_me <- function() {
message("You shouldn't have done that...")
while(TRUE) {
tryCatch(
Sys.sleep(1),
interrupt = function(err) {
message("You can't escape that easily!")
}
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment