Skip to content
Prev 18095 / 63424 Next

RFC: API to allow identification of warnings and errors in the output stream

On Mon, 17 Oct 2005, Thomas Friedrichsmeier wrote:

            
This looks less problematic, but others in R-core are more familiar
with the possible ramifications.  In any case but I also do not
believe you have made a solid case for the change.
How do you know the overhead added is significant?  The actual amount
of overhead depends on where the handler setup code is relative to the
UI loop, but even with the handler setup code pushed into the
innermost part I doubt very much that the overhead is noticeable in a
human/computer interaction context.
You need more than just withCallingHandlers if you want full control.
You will probably need a combination of withCallingHandlers, tryCatch
and withRestarts.  Look at the definition of .try_quietly in the tools
package for one example of this sort of thing.
Yes--when handlers are established the internal errorcall and
warningcall functions produce and signal conditions.
This remark from your earlier posting is the reson for the wording I
chose in my reply.  Instead of complicating the internals I would
prefer to help you get to the point were you understand what you need
know.
There is a reason that .Internal (.addCondHands (...)) is only
documented in the primordial documentation (i.e. the source code) ...
If efficiency in the sense of execution speed is really an issue we
can look into working on that.  Given my experience with similar
things on _much_ slower machines (33MHz Macintosh SE 30, for example)
I very much doubt that this is an issue.  If there are things that can
be done to make the condition system easier to work with then we can
look into that as well.

Best,

luke