//
//  SPRequestError.m
//  SharedParking
//
//  Created by gui_huan on 2018/3/26.
//  Copyright © 2018年 gui_huan. All rights reserved.
//

#import "SPRequestError.h"

@implementation SPRequestError
+ (instancetype)errorWithReason:(NSString *)reason errorCode:(NSInteger)errorCode
{
    SPRequestError *error = [[SPRequestError alloc] init];
    error.code  =errorCode;
    error.msg = reason;
    return  error;
}

+ (instancetype)errorWithReason:(NSString *)reason
{
    SPRequestError *error = [[SPRequestError alloc] init];
    error.msg = reason;
    error.code  = SPErrorCode_CustomError;
    return  error;
}

@end
