yihui/knitr — pull request #690 by krlmlr (2013-12-11 10:07:53+00:00)
Title: output file and line when printing error

Example output:

```
test.Rmd:10-11: Chunk unnamed-chunk-2:
Error: non-numeric argument to binary operator

Number of messages:
error
1
```

Input:

Test.

```{r echo=F}
options(knitr.package.verbose=T)
opts_chunk$set()
```

Bar.

```{r}
1 + 'a'
```

Baz.

The erroring chunk is actually three lines long, this one-off error will be handled by a separate PR.

Fixes #688.