Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quarto documents with rlang errors throw badly #225

Open
pawelru opened this issue Oct 3, 2024 · 1 comment
Open

quarto documents with rlang errors throw badly #225

pawelru opened this issue Oct 3, 2024 · 1 comment

Comments

@pawelru
Copy link

pawelru commented Oct 3, 2024

file _quarto.yaml:

project:
  type: website
  title: "test"

file test.qmd:

---
title: Test
---

Hello world!

```{r}
rlang::abort("oh no!")
```

Output:

❯ quarto render

processing file: test.qmd
1/3                  
2/3 [unnamed-chunk-1]
Error in `!continue`:
! invalid argument type
Backtrace:
  1. global .main()
  2. execute(...)
  3. rmarkdown::render(...)
  4. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  5. knitr:::process_file(text, output)
     ...
  9. knitr:::call_block(x)
 10. knitr:::block_exec(params)
 11. knitr:::eng_r(options)
 14. knitr (local) evaluate(...)
 15. evaluate::evaluate(...)

Quitting from lines 8-9 [unnamed-chunk-1] (test.qmd)
Execution halted

The expected result is as when converted to stop():

❯ quarto render

processing file: test.qmd
1/3                  
2/3 [unnamed-chunk-1]
Error:
! oh no!
Backtrace:
  1. global .main()
  2. execute(...)
  3. rmarkdown::render(...)
  4. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  5. knitr:::process_file(text, output)
     ...
 16. base::withRestarts(...)
 17. base (local) withRestartList(expr, restarts)
 18. base (local) withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
 19. base (local) docall(restart$handler, restartArgs)
 21. evaluate (local) fun(base::quote(`<smplErrr>`))

Quitting from lines 8-9 [unnamed-chunk-1] (test.qmd)
Execution halted
@hadley
Copy link
Member

hadley commented Oct 3, 2024

Duplicate of yihui/knitr#2366

@hadley hadley marked this as a duplicate of yihui/knitr#2366 Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants