Repository navigation
Conversation
Misaka-L
force-pushed
the
fix/bcl-launcher-throw-exception-instead-of-return-false
branch
from
July 5, 2026 10:18
bd4abc4 to
5ccd9c9
Compare
Misaka-L
marked this pull request as ready for review
July 5, 2026 10:18
|
You can test this PR using the following package version. |
Collaborator
|
Contributor
Author
|
@cla-avalonia agree |
MrJul
requested changes
Jul 6, 2026
| } | ||
| } | ||
| else | ||
| catch |
Member
There was a problem hiding this comment.
Please log the exception (use Logger.TryGet).
|
You can test this PR using the following package version. |
MrJul
added this pull request to the merge queue
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does the pull request do?
This pull request add a try catch block to the
Avalonia.Platform.Storage.FileIO.BclLauncher.Execmethod.Which will catch all the exception throw by
Process.Start()and returnfalsewhen it throw.What is the current behavior?
As #21673 described, if
Process.Start()throw a exception, theBclLauncherwill throw the exception instead of returnfalse.(In the case, if user try to launch a url, which url handler path is not exist, it will throw
Win32Exception)Since the API return a
bool, developers may pretend this API will return is operation succussed instead of throw a exception.What is the updated/expected behavior with this PR?
The
BclLauncher.Execshould never throw exception, instead, it returnfalseas user may excepted.How was the solution implemented (if it's not obvious)?
Add a
try catchblock to theAvalonia.Platform.Storage.FileIO.BclLauncher.Execmethod.*NOTE: It will also hide all exception which maybe helpful for debugging, maybe debug logging or an API (not in this PR) throw exception will be better.
Checklist
BclLauncherbehavior match theILauncherdocument described.Fixed issues
Fixes #21673