Test the calling.handlers option.

knitr::opts_chunk$set(
  calling.handlers = list(error = hnd)
)
1 + ""


Try the knitr package in your browser

Any scripts or data that you put into this service are public.

knitr documentation built on June 22, 2024, 9:25 a.m.