diff options
author | Jason Wray <friedbunny@users.noreply.github.com> | 2018-08-09 13:35:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-09 13:35:28 -0400 |
commit | ec7b920603299f66332df3b324ed481c732b3657 (patch) | |
tree | 4561cda90d0a1a75f84f72f3a077a6e6b954c92b /platform/darwin/src/MGLOfflineStorage.mm | |
parent | a378d6fc9b71d5a40750158c5f7c475669408052 (diff) | |
download | qtlocation-mapboxgl-ec7b920603299f66332df3b324ed481c732b3657.tar.gz |
[ios] Standardize exception definitions
Diffstat (limited to 'platform/darwin/src/MGLOfflineStorage.mm')
-rw-r--r-- | platform/darwin/src/MGLOfflineStorage.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/darwin/src/MGLOfflineStorage.mm b/platform/darwin/src/MGLOfflineStorage.mm index f4e454534d..e6c10e942b 100644 --- a/platform/darwin/src/MGLOfflineStorage.mm +++ b/platform/darwin/src/MGLOfflineStorage.mm @@ -30,6 +30,8 @@ const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyProgress = @"Progress"; const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyError = @"Error"; const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyMaximumCount = @"MaximumCount"; +const MGLExceptionName MGLUnsupportedRegionTypeException = @"MGLUnsupportedRegionTypeException"; + @interface MGLOfflineStorage () @property (nonatomic, strong, readwrite) NSMutableArray<MGLOfflinePack *> *packs; @@ -278,8 +280,8 @@ const MGLOfflinePackUserInfoKey MGLOfflinePackUserInfoKeyMaximumCount = @"Maximu - (void)_addPackForRegion:(id <MGLOfflineRegion>)region withContext:(NSData *)context completionHandler:(MGLOfflinePackAdditionCompletionHandler)completion { if (![region conformsToProtocol:@protocol(MGLOfflineRegion_Private)]) { - [NSException raise:@"Unsupported region type" format: - @"Regions of type %@ are unsupported.", NSStringFromClass([region class])]; + [NSException raise:MGLUnsupportedRegionTypeException + format:@"Regions of type %@ are unsupported.", NSStringFromClass([region class])]; return; } |