From 8bc144b6d1d2affb295466ead2350ce745dc1acc Mon Sep 17 00:00:00 2001 From: sgschantz Date: Tue, 3 Dec 2024 10:48:57 +0700 Subject: [PATCH] refactor(mac): raise exception when unable to read kmx data --- mac/KeymanEngine4Mac/KeymanEngine4Mac/CoreWrapper/CoreWrapper.m | 1 + 1 file changed, 1 insertion(+) diff --git a/mac/KeymanEngine4Mac/KeymanEngine4Mac/CoreWrapper/CoreWrapper.m b/mac/KeymanEngine4Mac/KeymanEngine4Mac/CoreWrapper/CoreWrapper.m index adcf8c14b60..ed2227f318e 100644 --- a/mac/KeymanEngine4Mac/KeymanEngine4Mac/CoreWrapper/CoreWrapper.m +++ b/mac/KeymanEngine4Mac/KeymanEngine4Mac/CoreWrapper/CoreWrapper.m @@ -115,6 +115,7 @@ -(void)loadKeyboardUsingCore:(NSString*) path { if (dataError != nil) { os_log_error([KMELogs coreLog], "loadKeyboardUsingCore, path: %{public}@\n dataError: %{public}@", path, dataError); + [NSException raise:@"LoadKeyboardException" format:@"%@", dataError]; } else { NSUInteger dataLength = data.length; os_log_info([KMELogs coreLog], "loadKeyboardUsingCore, path: %{public}@\n dataLength: %lu", path, dataLength);