Skip to content
Prev 69894 / 398506 Next

Testing for warning inside functions

On Wed, 18 May 2005, Peter Wolf wrote:

            
Well, only in an error handler, as an error normally throws you out of the 
function.  (That is the point of geterrmessage(), to enable error handlers 
to be written.)

To print the message immediately, look up options("warn").  We don't have 
a general warnings handler mechanism, but you can make use of condition 
objects.
What exactly is `this question'?  I see several assertions but no 
question.  (It would have been helpful to give an exact reference to the 
archives.)