summaryrefslogtreecommitdiff
path: root/platform/darwin/src
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src')
-rw-r--r--platform/darwin/src/MGLComputedShapeSource.h2
-rw-r--r--platform/darwin/src/MGLComputedShapeSource.mm12
-rw-r--r--platform/darwin/src/MGLForegroundStyleLayer.mm2
-rw-r--r--platform/darwin/src/MGLOfflinePack.h3
-rw-r--r--platform/darwin/src/MGLOfflinePack.mm4
-rw-r--r--platform/darwin/src/MGLOfflineStorage.h2
-rw-r--r--platform/darwin/src/MGLOfflineStorage.mm6
-rw-r--r--platform/darwin/src/MGLShape.mm7
-rw-r--r--platform/darwin/src/MGLSource.mm2
-rw-r--r--platform/darwin/src/MGLStyle.h6
-rw-r--r--platform/darwin/src/MGLStyle.mm20
-rw-r--r--platform/darwin/src/MGLStyleLayer.h2
-rw-r--r--platform/darwin/src/MGLStyleLayer.mm4
-rw-r--r--platform/darwin/src/MGLStyleLayer_Private.h2
-rw-r--r--platform/darwin/src/MGLTilePyramidOfflineRegion.mm5
-rw-r--r--platform/darwin/src/MGLTileSource.mm4
-rw-r--r--platform/darwin/src/MGLTypes.h8
-rw-r--r--platform/darwin/src/MGLTypes.m2
-rw-r--r--platform/darwin/src/MGLVectorStyleLayer.m4
-rw-r--r--platform/darwin/src/NSBundle+MGLAdditions.h2
-rw-r--r--platform/darwin/src/NSBundle+MGLAdditions.m6
21 files changed, 74 insertions, 31 deletions
diff --git a/platform/darwin/src/MGLComputedShapeSource.h b/platform/darwin/src/MGLComputedShapeSource.h
index faf8871fc7..84dc4801a7 100644
--- a/platform/darwin/src/MGLComputedShapeSource.h
+++ b/platform/darwin/src/MGLComputedShapeSource.h
@@ -32,6 +32,8 @@ FOUNDATION_EXTERN MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionWrap
*/
FOUNDATION_EXTERN MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionClipsCoordinates;
+FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLInvalidDatasourceException;
+
/**
Data source for `MGLComputedShapeSource`. This protocol defines two optional methods for fetching
data, one based on tile coordinates, and one based on a bounding box. Classes that implement this
diff --git a/platform/darwin/src/MGLComputedShapeSource.mm b/platform/darwin/src/MGLComputedShapeSource.mm
index 04734d0ef5..609db7f399 100644
--- a/platform/darwin/src/MGLComputedShapeSource.mm
+++ b/platform/darwin/src/MGLComputedShapeSource.mm
@@ -10,6 +10,8 @@
#include <mbgl/tile/tile_id.hpp>
#include <mbgl/util/geojson.hpp>
+const MGLExceptionName MGLInvalidDatasourceException = @"MGLInvalidDatasourceException";
+
const MGLShapeSourceOption MGLShapeSourceOptionWrapsCoordinates = @"MGLShapeSourceOptionWrapsCoordinates";
const MGLShapeSourceOption MGLShapeSourceOptionClipsCoordinates = @"MGLShapeSourceOptionClipsCoordinates";
@@ -205,10 +207,12 @@ mbgl::style::CustomGeometrySource::Options MBGLCustomGeometrySourceOptionsFromDi
self.dataSourceImplementsFeaturesForTile = [dataSource respondsToSelector:@selector(featuresInTileAtX:y:zoomLevel:)];
self.dataSourceImplementsFeaturesForBounds = [dataSource respondsToSelector:@selector(featuresInCoordinateBounds:zoomLevel:)];
- if(!self.dataSourceImplementsFeaturesForBounds && !self.dataSourceImplementsFeaturesForTile) {
- [NSException raise:@"Invalid Datasource" format:@"Datasource does not implement any MGLComputedShapeSourceDataSource methods"];
- } else if(self.dataSourceImplementsFeaturesForBounds && self.dataSourceImplementsFeaturesForTile) {
- [NSException raise:@"Invalid Datasource" format:@"Datasource implements multiple MGLComputedShapeSourceDataSource methods"];
+ if (!self.dataSourceImplementsFeaturesForBounds && !self.dataSourceImplementsFeaturesForTile) {
+ [NSException raise:MGLInvalidDatasourceException
+ format:@"Datasource does not implement any MGLComputedShapeSourceDataSource methods"];
+ } else if (self.dataSourceImplementsFeaturesForBounds && self.dataSourceImplementsFeaturesForTile) {
+ [NSException raise:MGLInvalidDatasourceException
+ format:@"Datasource implements multiple MGLComputedShapeSourceDataSource methods"];
}
_dataSource = dataSource;
diff --git a/platform/darwin/src/MGLForegroundStyleLayer.mm b/platform/darwin/src/MGLForegroundStyleLayer.mm
index 6888f89b92..76700d6f77 100644
--- a/platform/darwin/src/MGLForegroundStyleLayer.mm
+++ b/platform/darwin/src/MGLForegroundStyleLayer.mm
@@ -3,7 +3,7 @@
@implementation MGLForegroundStyleLayer
- (NSString *)sourceIdentifier {
- [NSException raise:@"MGLAbstractClassException"
+ [NSException raise:MGLAbstractClassException
format:@"MGLForegroundStyleLayer is an abstract class"];
return nil;
}
diff --git a/platform/darwin/src/MGLOfflinePack.h b/platform/darwin/src/MGLOfflinePack.h
index dfc47bf1c8..3d22f74e72 100644
--- a/platform/darwin/src/MGLOfflinePack.h
+++ b/platform/darwin/src/MGLOfflinePack.h
@@ -1,10 +1,13 @@
#import <Foundation/Foundation.h>
#import "MGLFoundation.h"
+#import "MGLTypes.h"
#import "MGLOfflineRegion.h"
NS_ASSUME_NONNULL_BEGIN
+FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLInvalidOfflinePackException;
+
/**
The state an offline pack is currently in.
*/
diff --git a/platform/darwin/src/MGLOfflinePack.mm b/platform/darwin/src/MGLOfflinePack.mm
index 4653021a58..9d903ee841 100644
--- a/platform/darwin/src/MGLOfflinePack.mm
+++ b/platform/darwin/src/MGLOfflinePack.mm
@@ -8,6 +8,8 @@
#include <mbgl/storage/default_file_source.hpp>
+const MGLExceptionName MGLInvalidOfflinePackException = @"MGLInvalidOfflinePackException";
+
/**
Assert that the current offline pack is valid.
@@ -17,7 +19,7 @@
#define MGLAssertOfflinePackIsValid() \
do { \
if (_state == MGLOfflinePackStateInvalid) { \
- [NSException raise:@"Invalid offline pack" \
+ [NSException raise:MGLInvalidOfflinePackException \
format: \
@"-[MGLOfflineStorage removePack:withCompletionHandler:] has been called " \
@"on this instance of MGLOfflinePack, rendering it invalid. It is an " \
diff --git a/platform/darwin/src/MGLOfflineStorage.h b/platform/darwin/src/MGLOfflineStorage.h
index 250efd23a6..f8ea6e7453 100644
--- a/platform/darwin/src/MGLOfflineStorage.h
+++ b/platform/darwin/src/MGLOfflineStorage.h
@@ -105,6 +105,8 @@ FOUNDATION_EXTERN MGL_EXPORT const MGLOfflinePackUserInfoKey MGLOfflinePackUserI
FOUNDATION_EXTERN MGL_EXPORT NSString * const MGLOfflinePackMaximumCountUserInfoKey __attribute__((unavailable("Use MGLOfflinePackUserInfoKeyMaximumCount")));
+FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLUnsupportedRegionTypeException;
+
/**
A block to be called once an offline pack has been completely created and
added.
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;
}
diff --git a/platform/darwin/src/MGLShape.mm b/platform/darwin/src/MGLShape.mm
index e76e06c7e4..59643dcb6a 100644
--- a/platform/darwin/src/MGLShape.mm
+++ b/platform/darwin/src/MGLShape.mm
@@ -40,7 +40,7 @@ bool operator==(const CLLocationCoordinate2D lhs, const CLLocationCoordinate2D r
}
- (mbgl::Geometry<double>)geometryObject {
- [NSException raise:@"MGLAbstractClassException"
+ [NSException raise:MGLAbstractClassException
format:@"MGLShape is an abstract class"];
return mbgl::Point<double>();
}
@@ -103,9 +103,8 @@ bool operator==(const CLLocationCoordinate2D lhs, const CLLocationCoordinate2D r
- (CLLocationCoordinate2D)coordinate
{
- [[NSException exceptionWithName:@"MGLAbstractClassException"
- reason:@"MGLShape is an abstract class"
- userInfo:nil] raise];
+ [NSException raise:MGLAbstractClassException
+ format:@"MGLShape is an abstract class"];
return kCLLocationCoordinate2DInvalid;
}
diff --git a/platform/darwin/src/MGLSource.mm b/platform/darwin/src/MGLSource.mm
index 6d57e14e8c..a32e223782 100644
--- a/platform/darwin/src/MGLSource.mm
+++ b/platform/darwin/src/MGLSource.mm
@@ -48,7 +48,7 @@
- (void)addToMapView:(MGLMapView *)mapView {
if (_pendingSource == nullptr) {
- [NSException raise:@"MGLRedundantSourceException"
+ [NSException raise:MGLRedundantSourceException
format:@"This instance %@ was already added to %@. Adding the same source instance " \
"to the style more than once is invalid.", self, mapView.style];
}
diff --git a/platform/darwin/src/MGLStyle.h b/platform/darwin/src/MGLStyle.h
index 814a09ed21..7b62432d36 100644
--- a/platform/darwin/src/MGLStyle.h
+++ b/platform/darwin/src/MGLStyle.h
@@ -31,6 +31,12 @@ NS_ASSUME_NONNULL_BEGIN
*/
static MGL_EXPORT const NSInteger MGLStyleDefaultVersion = 10;
+FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLInvalidStyleURLException;
+FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLRedundantLayerException;
+FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLRedundantLayerIdentifierException;
+FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLRedundantSourceException;
+FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLRedundantSourceIdentifierException;
+
/**
The proxy object for the current map style.
diff --git a/platform/darwin/src/MGLStyle.mm b/platform/darwin/src/MGLStyle.mm
index e0415c02f7..88499cf9bb 100644
--- a/platform/darwin/src/MGLStyle.mm
+++ b/platform/darwin/src/MGLStyle.mm
@@ -55,6 +55,12 @@
#import "NSImage+MGLAdditions.h"
#endif
+const MGLExceptionName MGLInvalidStyleURLException = @"MGLInvalidStyleURLException";
+const MGLExceptionName MGLRedundantLayerException = @"MGLRedundantLayerException";
+const MGLExceptionName MGLRedundantLayerIdentifierException = @"MGLRedundantLayerIdentifierException";
+const MGLExceptionName MGLRedundantSourceException = @"MGLRedundantSourceException";
+const MGLExceptionName MGLRedundantSourceIdentifierException = @"MGLRedundantSourceIdentifierException";
+
/**
Model class for localization changes.
*/
@@ -210,7 +216,7 @@ static_assert(6 == mbgl::util::default_styles::numOrderedStyles,
try {
[source addToMapView:self.mapView];
} catch (std::runtime_error & err) {
- [NSException raise:@"MGLRedundantSourceIdentifierException" format:@"%s", err.what()];
+ [NSException raise:MGLRedundantSourceIdentifierException format:@"%s", err.what()];
}
}
@@ -313,14 +319,14 @@ static_assert(6 == mbgl::util::default_styles::numOrderedStyles,
MGLStyleLayer *sibling = layers.size() ? [self layerFromMBGLLayer:layers.at(0)] : nil;
[styleLayer addToStyle:self belowLayer:sibling];
} catch (const std::runtime_error & err) {
- [NSException raise:@"MGLRedundantLayerIdentifierException" format:@"%s", err.what()];
+ [NSException raise:MGLRedundantLayerIdentifierException format:@"%s", err.what()];
}
} else {
try {
MGLStyleLayer *sibling = [self layerFromMBGLLayer:layers.at(index)];
[styleLayer addToStyle:self belowLayer:sibling];
} catch (std::runtime_error & err) {
- [NSException raise:@"MGLRedundantLayerIdentifierException" format:@"%s", err.what()];
+ [NSException raise:MGLRedundantLayerIdentifierException format:@"%s", err.what()];
}
}
}
@@ -402,7 +408,7 @@ static_assert(6 == mbgl::util::default_styles::numOrderedStyles,
try {
[layer addToStyle:self belowLayer:nil];
} catch (std::runtime_error & err) {
- [NSException raise:@"MGLRedundantLayerIdentifierException" format:@"%s", err.what()];
+ [NSException raise:MGLRedundantLayerIdentifierException format:@"%s", err.what()];
}
[self didChangeValueForKey:@"layers"];
}
@@ -431,7 +437,7 @@ static_assert(6 == mbgl::util::default_styles::numOrderedStyles,
try {
[layer addToStyle:self belowLayer:sibling];
} catch (std::runtime_error & err) {
- [NSException raise:@"MGLRedundantLayerIdentifierException" format:@"%s", err.what()];
+ [NSException raise:MGLRedundantLayerIdentifierException format:@"%s", err.what()];
}
[self didChangeValueForKey:@"layers"];
}
@@ -473,14 +479,14 @@ static_assert(6 == mbgl::util::default_styles::numOrderedStyles,
try {
[layer addToStyle:self belowLayer:nil];
} catch (std::runtime_error & err) {
- [NSException raise:@"MGLRedundantLayerIdentifierException" format:@"%s", err.what()];
+ [NSException raise:MGLRedundantLayerIdentifierException format:@"%s", err.what()];
}
} else {
MGLStyleLayer *sibling = [self layerFromMBGLLayer:layers.at(index + 1)];
try {
[layer addToStyle:self belowLayer:sibling];
} catch (std::runtime_error & err) {
- [NSException raise:@"MGLRedundantLayerIdentifierException" format:@"%s", err.what()];
+ [NSException raise:MGLRedundantLayerIdentifierException format:@"%s", err.what()];
}
}
[self didChangeValueForKey:@"layers"];
diff --git a/platform/darwin/src/MGLStyleLayer.h b/platform/darwin/src/MGLStyleLayer.h
index b610a27607..60634946cb 100644
--- a/platform/darwin/src/MGLStyleLayer.h
+++ b/platform/darwin/src/MGLStyleLayer.h
@@ -5,6 +5,8 @@
NS_ASSUME_NONNULL_BEGIN
+FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLInvalidStyleLayerException;
+
/**
`MGLStyleLayer` is an abstract base class for style layers. A style layer
manages the layout and appearance of content at a specific z-index in a style.
diff --git a/platform/darwin/src/MGLStyleLayer.mm b/platform/darwin/src/MGLStyleLayer.mm
index 6400b8fcbf..05885bc63e 100644
--- a/platform/darwin/src/MGLStyleLayer.mm
+++ b/platform/darwin/src/MGLStyleLayer.mm
@@ -4,6 +4,8 @@
#include <mbgl/style/style.hpp>
#include <mbgl/style/layer.hpp>
+const MGLExceptionName MGLInvalidStyleLayerException = @"MGLInvalidStyleLayerException";
+
@interface MGLStyleLayer ()
@property (nonatomic, readonly) mbgl::style::Layer *rawLayer;
@@ -33,7 +35,7 @@
- (void)addToStyle:(MGLStyle *)style belowLayer:(MGLStyleLayer *)otherLayer
{
if (_pendingLayer == nullptr) {
- [NSException raise:@"MGLRedundantLayerException"
+ [NSException raise:MGLRedundantLayerException
format:@"This instance %@ was already added to %@. Adding the same layer instance " \
"to the style more than once is invalid.", self, style];
}
diff --git a/platform/darwin/src/MGLStyleLayer_Private.h b/platform/darwin/src/MGLStyleLayer_Private.h
index 9bee013c3d..ea43c680e0 100644
--- a/platform/darwin/src/MGLStyleLayer_Private.h
+++ b/platform/darwin/src/MGLStyleLayer_Private.h
@@ -24,7 +24,7 @@ struct LayerWrapper {
#define MGLAssertStyleLayerIsValid() \
do { \
if (!self.rawLayer) { \
- [NSException raise:@"Invalid style layer" \
+ [NSException raise:MGLInvalidStyleLayerException \
format: \
@"-[MGLStyle removeLayer:] has been called " \
@"with this instance but another style layer instance was added with the same identifer. It is an " \
diff --git a/platform/darwin/src/MGLTilePyramidOfflineRegion.mm b/platform/darwin/src/MGLTilePyramidOfflineRegion.mm
index e0d56484bf..7333703267 100644
--- a/platform/darwin/src/MGLTilePyramidOfflineRegion.mm
+++ b/platform/darwin/src/MGLTilePyramidOfflineRegion.mm
@@ -23,8 +23,7 @@
}
- (instancetype)init {
- [NSException raise:@"Method unavailable"
- format:
+ [NSException raise:NSGenericException format:
@"-[MGLTilePyramidOfflineRegion init] is unavailable. "
@"Use -initWithStyleURL:bounds:fromZoomLevel:toZoomLevel: instead."];
return nil;
@@ -37,7 +36,7 @@
}
if (!styleURL.scheme) {
- [NSException raise:@"Invalid style URL" format:
+ [NSException raise:MGLInvalidStyleURLException format:
@"%@ does not support setting a relative file URL as the style URL. "
@"To download the online resources required by this style, "
@"specify a URL to an online copy of this style. "
diff --git a/platform/darwin/src/MGLTileSource.mm b/platform/darwin/src/MGLTileSource.mm
index 2fafc6fb51..eef3b33430 100644
--- a/platform/darwin/src/MGLTileSource.mm
+++ b/platform/darwin/src/MGLTileSource.mm
@@ -25,7 +25,7 @@ const MGLTileSourceOption MGLTileSourceOptionDEMEncoding = @"MGLTileSourceOption
@implementation MGLTileSource
- (NSURL *)configurationURL {
- [NSException raise:@"MGLAbstractClassException"
+ [NSException raise:MGLAbstractClassException
format:@"MGLTileSource is an abstract class"];
return nil;
}
@@ -41,7 +41,7 @@ const MGLTileSourceOption MGLTileSourceOptionDEMEncoding = @"MGLTileSourceOption
}
- (NSString *)attributionHTMLString {
- [NSException raise:@"MGLAbstractClassException"
+ [NSException raise:MGLAbstractClassException
format:@"MGLTileSource is an abstract class"];
return nil;
}
diff --git a/platform/darwin/src/MGLTypes.h b/platform/darwin/src/MGLTypes.h
index 3abc116ad7..95065999af 100644
--- a/platform/darwin/src/MGLTypes.h
+++ b/platform/darwin/src/MGLTypes.h
@@ -30,6 +30,14 @@ NS_ASSUME_NONNULL_BEGIN
typedef NSString *NSNotificationName;
#endif
+typedef NSString *MGLExceptionName NS_TYPED_EXTENSIBLE_ENUM;
+
+/**
+ :nodoc: Generic exceptions used across multiple disparate classes. Exceptions
+ that are unique to a class or class-cluster should be defined in those headers.
+ */
+FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLAbstractClassException;
+
/** Indicates an error occurred in the Mapbox SDK. */
FOUNDATION_EXTERN MGL_EXPORT NSErrorDomain const MGLErrorDomain;
diff --git a/platform/darwin/src/MGLTypes.m b/platform/darwin/src/MGLTypes.m
index 01e9a1467c..89f88a9c1d 100644
--- a/platform/darwin/src/MGLTypes.m
+++ b/platform/darwin/src/MGLTypes.m
@@ -1,3 +1,5 @@
#import "MGLTypes.h"
+const MGLExceptionName MGLAbstractClassException = @"MGLAbstractClassException";
+
NSString * const MGLErrorDomain = @"MGLErrorDomain";
diff --git a/platform/darwin/src/MGLVectorStyleLayer.m b/platform/darwin/src/MGLVectorStyleLayer.m
index da6da0ea7f..23f3556e0b 100644
--- a/platform/darwin/src/MGLVectorStyleLayer.m
+++ b/platform/darwin/src/MGLVectorStyleLayer.m
@@ -3,12 +3,12 @@
@implementation MGLVectorStyleLayer
- (void)setPredicate:(NSPredicate *)predicate {
- [NSException raise:@"MGLAbstractClassException"
+ [NSException raise:MGLAbstractClassException
format:@"MGLVectorStyleLayer is an abstract class"];
}
- (NSPredicate *)predicate {
- [NSException raise:@"MGLAbstractClassException"
+ [NSException raise:MGLAbstractClassException
format:@"MGLVectorStyleLayer is an abstract class"];
return nil;
}
diff --git a/platform/darwin/src/NSBundle+MGLAdditions.h b/platform/darwin/src/NSBundle+MGLAdditions.h
index 86dc27f22c..dcafefedec 100644
--- a/platform/darwin/src/NSBundle+MGLAdditions.h
+++ b/platform/darwin/src/NSBundle+MGLAdditions.h
@@ -27,6 +27,8 @@ NS_ASSUME_NONNULL_BEGIN
#define NSLocalizedStringWithDefaultValue(key, tbl, bundle, val, comment) \
[[NSBundle mgl_frameworkBundle] localizedStringForKey:(key) value:(val) table:(tbl)]
+FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLBundleNotFoundException;
+
@interface NSBundle (MGLAdditions)
/// Returns the bundle containing the SDK’s classes and Info.plist file.
diff --git a/platform/darwin/src/NSBundle+MGLAdditions.m b/platform/darwin/src/NSBundle+MGLAdditions.m
index 37f78963d3..d472e40b1f 100644
--- a/platform/darwin/src/NSBundle+MGLAdditions.m
+++ b/platform/darwin/src/NSBundle+MGLAdditions.m
@@ -2,6 +2,8 @@
#import "MGLAccountManager.h"
+const MGLExceptionName MGLBundleNotFoundException = @"MGLBundleNotFoundException";
+
@implementation NSBundle (MGLAdditions)
+ (instancetype)mgl_frameworkBundle {
@@ -14,8 +16,8 @@
if (bundlePath) {
bundle = [self bundleWithPath:bundlePath];
} else {
- [NSException raise:@"MGLBundleNotFoundException" format:
- @"The Mapbox framework bundle could not be found. If using the Mapbox Maps SDK for iOS as a static framework, make sure that Mapbox.bundle is copied into the root of the app bundle."];
+ [NSException raise:MGLBundleNotFoundException
+ format:@"The Mapbox framework bundle could not be found. If using the Mapbox Maps SDK for iOS as a static framework, make sure that Mapbox.bundle is copied into the root of the app bundle."];
}
}