ThinkR-open / ThinkR-open/squash

feat: The error message should be printed whenever there is an error in `render_single_qmd()`

Open
#14 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
9
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Description

The error message is not printed here :

  # try rendering qmd and warn user if successful / fail
  tryCatch(
    expr = {
      quarto_render(
        input = qmd,
        metadata = c(metadata, list(`extract-media` = img_dir)),
        output_format = output_format,
        quiet = quiet
      )
      return(TRUE)
    },
    error = \(error_message) {
      cli_alert_danger("Failed to render {qmd}, cleaning and existing")

      # throw an error with original error message
      return(FALSE)
    }
  )

It should be printed, maybe if debug is TRUE?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the render_single_qmd() error handler shown in the issue and inspect how the caught error is currently discarded. Determine whether the original error message should always be surfaced or only when debug is enabled. Done means failed renders expose the underlying error while retaining the existing failure behavior; no test file is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.