Updated iOS error messages

This commit is contained in:
Prianka Liz Kariat 2023-05-02 08:44:47 +05:30
parent dffb73e4eb
commit c9b00b07e0

View File

@ -52,20 +52,23 @@ static const NSInteger kMPPOrientationDegreesLeft = -270;
case MPPRunningModeImage: case MPPRunningModeImage:
case MPPRunningModeVideo: { case MPPRunningModeVideo: {
if (packetsCallback) { if (packetsCallback) {
[MPPCommonUtils createCustomError:error [MPPCommonUtils
createCustomError:error
withCode:MPPTasksErrorCodeInvalidArgumentError withCode:MPPTasksErrorCodeInvalidArgumentError
description:@"The vision task is in image or video mode, a " description:@"The vision task is in image or video mode. The delegate must not be set in the task's options."];
@"user-defined result callback should not be provided."];
return nil; return nil;
} }
break; break;
} }
case MPPRunningModeLiveStream: { case MPPRunningModeLiveStream: {
if (!packetsCallback) { if (!packetsCallback) {
[MPPCommonUtils createCustomError:error [MPPCommonUtils
createCustomError:error
withCode:MPPTasksErrorCodeInvalidArgumentError withCode:MPPTasksErrorCodeInvalidArgumentError
description:@"The vision task is in live stream mode, a user-defined " description:
@"result callback must be provided."]; @"The vision task is in live stream mode. An object must be set as the "
@"delegate of the task in its options to ensure asynchronous delivery of "
@"results."];
return nil; return nil;
} }
break; break;