Add 'server/' from commit '800090542d91beae40bc81fc41b67ba61c47da77'
git-subtree-dir: server git-subtree-mainline:6a4054c15agit-subtree-split:800090542d
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// MBIMErrorResponse.m
|
||||
// kordophoned
|
||||
//
|
||||
// Created by James Magahern on 8/3/22.
|
||||
// Copyright © 2022 James Magahern. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MBIMErrorResponse.h"
|
||||
|
||||
@implementation MBIMErrorResponse {
|
||||
int _status;
|
||||
}
|
||||
|
||||
- (instancetype)initWithErrorCode:(int)httpErrorCode
|
||||
{
|
||||
if (self = [super initWithData:nil]) {
|
||||
_status = httpErrorCode;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithErrorCode:(int)httpErrorCode message:(NSString *)message
|
||||
{
|
||||
if (self = [super initWithData:[message dataUsingEncoding:NSUTF8StringEncoding]]) {
|
||||
_status = httpErrorCode;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSInteger)status
|
||||
{
|
||||
return _status;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user