Add ns_error_domain compiler attribute to STPError

This commit is contained in:
Jake Bellamy 2016-10-05 17:12:18 +13:00
parent d8dfab70e7
commit 0e1f023890
1 changed files with 2 additions and 1 deletions

View File

@ -13,7 +13,8 @@
*/
FOUNDATION_EXPORT NSString * __nonnull const StripeDomain;
typedef NS_ENUM(NSInteger, STPErrorCode) {
typedef enum STPError: NSInteger STPErrorCode;
enum __attribute__((ns_error_domain(StripeDomain))) STPErrorCode: NSInteger {
STPConnectionError = 40, // Trouble connecting to Stripe.
STPInvalidRequestError = 50, // Your request had invalid parameters.
STPAPIError = 60, // General-purpose API error (should be rare).