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

NSDistributedNotificationCenter: Throw a descriptive exception when gdnc could not be found #337

Merged
merged 1 commit into from
Oct 21, 2023

Conversation

qmfrederik
Copy link
Contributor

NSTask launchPathForTool: @"gdnc"]; can return nil when the tool is not found. In this case, [NSTask launchedTaskWithLaunchPath] would raise a NSInvalidArgumentException with error message "NSTask - no launch path set" which is not very descriptive.

@qmfrederik qmfrederik requested a review from rfm as a code owner October 11, 2023 14:30
…dnc could not be found

`NSTask launchPathForTool: @"gdnc"];` can return `nil` when the tool is not found.  In this case, `[NSTask launchedTaskWithLaunchPath]` would raise a `NSInvalidArgumentException` with error message "NSTask - no launch path set" which is not very descriptive.
@qmfrederik
Copy link
Contributor Author

This one bit me a couple of times, and it took me some time to figure out what the NSTask - no launch path set error message in my log files was referring to. Hopefully generating a better error message will save some folks some time in the future ;-)

Copy link
Contributor

@rfm rfm left a comment

Choose a reason for hiding this comment

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

Looks good. I thought I'd already said so, but I guess I must have failed to hit the submit button.

@rfm rfm merged commit ab11ba2 into gnustep:master Oct 21, 2023
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants