Merge pull request #337 from qmfrederik/fixes/tool-not-found-error

NSDistributedNotificationCenter: Throw a descriptive exception when gdnc could not be found
This commit is contained in:
rfm 2023-10-21 19:08:02 +01:00 committed by GitHub
commit ab11ba285e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -699,6 +699,12 @@ static NSDistributedNotificationCenter *netCenter = nil;
cmd = [NSTask launchPathForTool: @"gdnc"];
if (cmd == nil)
{
[NSException raise: NSInternalInconsistencyException
format: @"Unable to find the gdnc tool.\n"];
}
NSDebugMLLog(@"NSDistributedNotificationCenter",
@"\nI couldn't contact the notification server for %@ -\n"
@"so I'm attempting to to start one - which will take a few seconds.\n"