> > I should have been clearer, sorry-- I'm trying to exit from an "inner" > function which might be several levels deep, returning straight to the R > prompt. To be specific, I'm trying to clean up the "No Error in..." message > in my 'debug' package-- the "No " prefix being my original workaround to > avoid an unnecessarily alarming message.
Ah, ok. How about signalling custom condition then? f <- function() { print("a") g() print("d") } g <- function() { print("b") error <- simpleError("") class(error) <- c("myerror", class(error)) signalCondition(error) print("c") } f() tryCatch(f(), myerror = function(...) print("stopped!")) Hadley -- http://had.co.nz/ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.