cameronbracken / pgfSweave

Quality graphics and speedy compilation with Sweave
http://r-forge.r-project.org/projects/pgfsweave/
29 stars 6 forks source link

should not put `if(inherits(keys, "try-error"))` in pgfSweaveEvalWithOpt()? #19

Closed yihui closed 13 years ago

yihui commented 13 years ago

I just realized pgfSweave would never issue errors, because you have put the statements like if(inherits(res, "try-error")) in the function pgfSweaveEvalWithOpt. This will make RweaveTryStop never fail since you have removed the "try-error" attribute from the real error message:

https://github.com/cameronbracken/pgfSweave/blob/master/R/pgfSweaveDriver.R#L471 https://github.com/cameronbracken/pgfSweave/blob/master/R/utilities.R#L70

cameronbracken commented 13 years ago

That was an artifact of some old changes I made to cacheSweaveEvalWithOpt. The changes were obsolete so I removed them and now am using the functions from cacheSweave directly:

https://github.com/cameronbracken/pgfSweave/commit/8e42d428bc76b86a49685f2c3f631bb37e743c2e

I think that fixes the issue.