Commit d9205a7e by Dima Bart

Refactor client initializer to assert instead of throw exception.

parent 7e2bbaf8
......@@ -87,11 +87,7 @@ NSString *const BUYClientCustomerAccessToken = @"X-Shopify-Customer-Access-Token
- (instancetype)initWithShopDomain:(NSString *)shopDomain apiKey:(NSString *)apiKey appId:(NSString *)appId
{
if (shopDomain.length == 0) {
NSException *exception = [NSException exceptionWithName:@"Bad shop domain" reason:@"Please ensure you initialize with a shop domain" userInfo:nil];
@throw exception;
}
NSAssert(shopDomain.length > 0, @"Bad shop domain. Please ensure you initialize with a shop domain");
self = [super init];
if (self) {
self.modelManager = [BUYModelManager modelManager];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment