### Bug description

I am not sure if this is a bug or not but I thought to report it regardless. 

Sometimes it is helpful to set the knitr error option to `TRUE` so that a document will render no matter what. 

At the same time I find using the `#| eval: !expr` approach pretty useful to defensively only render certain chunks based on a condition. Unfortunately these two error handling strategies don't seem to mesh together and I wondering if that is on purpose. In the reprex below I've set the knitr option `error = TRUE` globally. That works to catch any errors in chunks. However if I try to pass a variable that has not been created because of an error in a previous chunk to `#| eval: !expr` the document will fail to render. 

My mental model was the knitr option should override that but the appears to not be the case. Any thoughts on whether this is a bad mental model?

Thanks so much for all the continued work on quarto. 

````
---
title: "Untitled"
format: 
  html: 
    self_contained: true
---

```{r setup}
knitr::opts_chunk$set(error = TRUE)
```

```{r}
stop("an error")
```

```{r}
var <- 1 + "2b"
```

```{r}
#| eval: !expr "var > 1"

message("chunk worked")
```

````

Using MacOS and VS code to render quarto.


quarto check:
```md
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.3.323
      Path: /Applications/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.9.16 (Conda)
      Path: /Users/samalbers/mambaforge/bin/python
      Jupyter: 4.11.1
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.2.3
      Path: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources
      LibPaths:
        - /Users/samalbers/Library/R/arm64/4.2/library
        - /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library
      knitr: 1.41
      rmarkdown: 2.18

[✓] Checking Knitr engine render......OK
```

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [X] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
2023-04-13T19:11:08Z
boshek
lint knitr
Future
open
Reconciling #| eval: !expr behaviour with knitr error handling 
https://github.com/quarto-dev/quarto-cli/issues/5182