Skip to content

Catch Errors reading resolved executable#2612

Merged
natebosch merged 2 commits intomasterfrom
sdk-null-type-error
Mar 19, 2026
Merged

Catch Errors reading resolved executable#2612
natebosch merged 2 commits intomasterfrom
sdk-null-type-error

Conversation

@natebosch
Copy link
Copy Markdown
Member

In some internal platform implementation the resolvedExecutable is
unexpectedly null and causes a TypeError. Generalize the catch to
ignore all errors, not just exceptions.

In some internal platform implementation the `resolvedExecutable` is
unexpectedly `null` and causes a `TypeError`. Generalize the catch to
ignore all errors, not just exceptions.
@natebosch natebosch requested a review from a team as a code owner March 19, 2026 22:50
@github-actions
Copy link
Copy Markdown

PR Health

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check.

## 1.31.1-wip

* Ignore an error locating the SDK directory on platforms where the
`resolvedExecutable` is unexpectedly null.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`resolvedExecutable` is unexpectedly null.
`resolvedExecutable` is unexpectedly `null`.

## 0.6.18-wip

* Ignore an error locating the SDK directory on platforms where the
`resolvedExecutable` is unexpectedly null.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`resolvedExecutable` is unexpectedly null.
`resolvedExecutable` is unexpectedly `null`.

@natebosch natebosch merged commit d320333 into master Mar 19, 2026
61 checks passed
@natebosch natebosch deleted the sdk-null-type-error branch March 19, 2026 23:07
try {
return p.dirname(p.dirname(Platform.resolvedExecutable));
} on Exception {
} catch (_) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, use on Object. The (_) feels a little spurious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants