Skip to content

Fix printCallRDiagnostics masking the original callR error - #14843

Open
cderv wants to merge 1 commit into
mainfrom
fix-14775-printcallrdiagnostics-5
Open

Fix printCallRDiagnostics masking the original callR error#14843
cderv wants to merge 1 commit into
mainfrom
fix-14775-printcallrdiagnostics-5

Conversation

@cderv

@cderv cderv commented Sep 2, 2026

Copy link
Copy Markdown
Member

When callR fails, printCallRDiagnostics re-enters R discovery (checkRBinary -> rBinaryPath) to explain why. A throw during that re-entry propagates and replaces the original callR error, so the user only sees a failure from the diagnostics code instead of the real cause.

This is the second concern raised on #14775, alongside the malformed QUARTO_R crash fixed in #14790: rBinaryPath no longer throws for that specific case, but printCallRDiagnostics itself was never hardened against a throw anywhere in the discovery chain it re-enters.

Wraps printCallRDiagnostics's body in try/catch and logs a warning on diagnostics failure instead of throwing over the original error.

Related to #14775

printCallRDiagnostics re-enters R discovery (checkRBinary -> rBinaryPath)
to explain a callR failure. A throw during that re-entry would propagate
and replace the original callR error the caller already reported,
hiding the real cause from the user. Wrap the body in try/catch and warn
on diagnostics failure instead.
@posit-snyk-bot

posit-snyk-bot commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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

Successfully merging this pull request may close these issues.

2 participants