mac-virtualcam: Treat extension installation cancellation as error

OSSystemExtensionErrorRequestCanceled is called when the activation
delegate returns OSSystemExtensionReplacementActionCancel on request
actionForReplacingExtension withExtension. As per the previous (parent)
commit we no longer request cancellation, so we can be sure that
receiving a "cancelled" error is an actual error and not something that
is supposed to happen.
This commit also removes the "error" from the log prefix, as the message
sent may also be a warning instead, and the LOG_LEVEL conveys the
severity of the log line anyways.
This commit is contained in:
gxalpha
2023-10-09 17:24:38 -06:00
committed by Lain
parent 61a4922364
commit 1781289f22
@@ -77,10 +77,6 @@ struct virtualcam_data {
int severity;
switch (error.code) {
case OSSystemExtensionErrorRequestCanceled:
errorMessage = @"macOS Camera Extension installation request cancelled.";
severity = LOG_INFO;
break;
case OSSystemExtensionErrorUnsupportedParentBundleLocation:
self.lastErrorMessage =
[NSString stringWithUTF8String:obs_module_text("Error.SystemExtension.WrongLocation")];
@@ -95,7 +91,7 @@ struct virtualcam_data {
break;
}
blog(severity, "mac-camera-extension error: %s", errorMessage.UTF8String);
blog(severity, "mac-camera-extension: %s", errorMessage.UTF8String);
}
- (void)request:(nonnull OSSystemExtensionRequest *)request didFinishWithResult:(OSSystemExtensionRequestResult)result