Skip to content
Prev 77711 / 398502 Next

warning.expression?

No, sorry, this does not work. Try this, if you like:

myfunc <- function () {
	warnings ()
}
options (warning.expression=quote (myfunc ()))
warning ("test")
tryCatch ()
and
withCallingHandlers ()

are a whole different story, as far as I understand them. I actually want 
_all_ warnings in the whole session to go through my handler (actually I'm 
writing a GUI front-end, and would like to have a way to easily identify all 
warnings).

That's what I thought warning.expression was designed for. So am I wrong in 
thinking so? If not, how to use it correctly?
It's quite possible, I'm overlooking something rather obvious. Not that 
obvious, however.

Regards
Thomas