'Force rmarkdown::render() to fail on error

I have a large rmarkdown file that gets rendered using the rmarkdown::render()-function inside of an Rscript file. Now I try to debug it, but I am unable to see error messages in the console output and it takes a long time to render everything.

Is there a way to force rmarkdown::render() to stop after the first error and output it to the terminal?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source