### Discussed in https://github.com/quarto-dev/quarto-cli/discussions/2433

<div type='discussions-op-text'>

<sup>Originally posted by **AmeliaMN** September 13, 2022</sup>
I posted this on the [RStudio community](https://community.rstudio.com/t/more-helpful-error-messages-when-quarto-options-are-mis-specified/147223) as well, but figured out it should actually be here. 

If you mess up when specifying your Quarto chunk options and use `=` instead of `:` in one of your code chunks (cough, former RMarkdown users), you will get a pretty impenetrable (to me) error about YAML. For example:

````
---
title: "Untitled"
format: pdf
editor: visual
---

```{r}
#| label: math
#| echo = false
2 * 2
```
````

Gives the error
```
processing file: test.qmd
Error in yaml::yaml.load(meta, handlers = list(expr = parse_only)) : 
  Scanner error: while scanning a simple key at line 2, column 1 could not find expected ':' at line 3, column 1
Calls: .main ... FUN -> parse_block -> partition_chunk -> <Anonymous>
Execution halted
```
I spent way too much time looking for errors in my header YAML, forgetting that those `#|` comments are basically YAML now, too. One of the problems is the `line 3` part. I was looking in the third line of my Quarto document!

Not sure if it would be possible, but it would be awesome to have an error message that said something like `Scanner error: while scanning the options in chunk 1, ...` </div>
cscheid
2022-09-13T23:01:05Z
cscheid
bug yaml-validation
v1.2
closed
More helpful error messages when Quarto chunk options are mis-specified
https://github.com/quarto-dev/quarto-cli/issues/2434