From 1cd3c05fc5a8c0de60ffffba04484a000a979cc0 Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Mon, 13 Feb 2023 19:58:14 +0530 Subject: [PATCH] Added default case to running mode check --- .../ios/vision/core/sources/MPPVisionTaskRunner.mm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mediapipe/tasks/ios/vision/core/sources/MPPVisionTaskRunner.mm b/mediapipe/tasks/ios/vision/core/sources/MPPVisionTaskRunner.mm index 208e4a5c8..1b14f2179 100644 --- a/mediapipe/tasks/ios/vision/core/sources/MPPVisionTaskRunner.mm +++ b/mediapipe/tasks/ios/vision/core/sources/MPPVisionTaskRunner.mm @@ -58,8 +58,14 @@ using ::mediapipe::CalculatorGraphConfig; } break; } - default: - break + default: { + [MPPCommonUtils + createCustomError:error + withCode:MPPTasksErrorCodeInvalidArgumentError + description: + @"Unrecognized running mode"]; + return nil; + } } _runningMode = runningMode;