Re: [R] how to stop without error message?

From: hadley wickham <>
Date: Mon, 10 Nov 2008 21:19:55 -0600

> 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() {

g <- function() {
  error <- simpleError("")
  class(error) <- c("myerror", class(error))   signalCondition(error)

tryCatch(f(), myerror = function(...) print("stopped!"))



______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 11 Nov 2008 - 03:22:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 11 Nov 2008 - 05:30:23 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive