On 2/14/08, Deepayan Sarkar <[EMAIL PROTECTED]> wrote:
> On 2/14/08, Felix Andrews <[EMAIL PROTECTED]> wrote:
> > You can tell Lattice to stop when an error occurs, like this:
> >
> >  lattice.options(panel.error="stop")
> >  xyplot(1:10 ~ 1:10, panel=function(...) stop("foo"))
> >  # -> Error in panel(x = 1:10, y = 1:10) : foo
> >
> >  That is a little more informative than the default "panel.error",
> >  because it tells you the conditionCall as well as the
> >  conditionMessage.
> >
> >  But unfortunately, traceback() will still not work as you expect, it
> >  will say something unhelpful about tryCatch() inside print.trellis().
> >  As far as I know there is no way to recover the call stack from an
> >  error once it has been caught by tryCatch. (I would be very happy to
> >  be proved wrong...)
>
> Right, and I've also thought that this was a bad thing. I'll see if I
> can figure out a way to restore traceback functionality. If all else
> fails, I'll just another option that disables the tryCatch mechanism.

I don't think there's a way around this when using tryCatch. The
latest lattice allows you to set

lattice.options(panel.error=NULL)

which disables the tryCatch mechanism and reverts to standard error handling.

-Deepayan

______________________________________________
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.

Reply via email to