Convenience methods for creating standardized instances.
More...
#import <OIDErrorUtilities.h>
Inherits NSObject.
Convenience methods for creating standardized instances.
◆ errorWithCode:underlyingError:description:()
+ (NSError *) errorWithCode: |
|
(OIDErrorCode) |
code |
underlyingError: |
|
(nullable NSError *) |
underlyingError |
description: |
|
(nullable NSString *) |
description |
|
|
| |
Creates a standard from an ::OIDErrorCode
and custom user info. Automatically populates the localized error description.
- Parameters
-
code | The error code. |
underlyingError | The underlying error which occurred, if applicable. |
description | A custom description, if applicable. |
- Returns
- An representing the error code.
◆ HTTPErrorWithHTTPResponse:data:()
+ (NSError *) HTTPErrorWithHTTPResponse: |
|
(NSHTTPURLResponse *) |
HTTPURLResponse |
data: |
|
(nullable NSData *) |
data |
|
|
| |
Creates a standard from an . Automatically populates the localized error description with the response data associated with the , if available.
- Parameters
-
HTTPURLResponse | The response which indicates an error occurred. |
data | The response data associated with the response which should be converted to an NSString assuming a UTF-8 encoding, if available. |
- Returns
- An representing the error.
◆ isOAuthErrorDomain:()
+ (BOOL) isOAuthErrorDomain: |
|
(NSString *) |
errorDomain |
|
◆ OAuthErrorCodeFromString:()
+ (OIDErrorCodeOAuth) OAuthErrorCodeFromString: |
|
(NSString *) |
errorCode |
|
◆ OAuthErrorWithDomain:OAuthResponse:underlyingError:()
+ (NSError *) OAuthErrorWithDomain: |
|
(NSString *) |
OAuthErrorDomain |
OAuthResponse: |
|
(NSDictionary *) |
errorResponse |
underlyingError: |
|
(nullable NSError *) |
underlyingError |
|
|
| |
◆ raiseException:()
+ (void) raiseException: |
|
(NSString *) |
name |
|
Raises an exception with the given name as both the name, and the message.
- Parameters
-
name | The name of the exception. |
◆ raiseException:message:()
Raises an exception with the given name and message.
- Parameters
-
name | The name of the exception. |
message | The message of the exception. |
◆ resourceServerAuthorizationErrorWithCode:errorResponse:underlyingError:()
+ (NSError *) resourceServerAuthorizationErrorWithCode: |
|
(NSInteger) |
code |
errorResponse: |
|
(nullable NSDictionary *) |
errorResponse |
underlyingError: |
|
(nullable NSError *) |
underlyingError |
|
|
| |
Creates a indicating that the resource server responded with an authorization error.
- Parameters
-
code | Your error code. |
errorResponse | The resource server error response, if any. |
underlyingError | The underlying error which occurred, if applicable. |
- Returns
- An representing the authorization error from the resource server.
The documentation for this class was generated from the following file:
- /Users/atmahajan/MobileAccess-SDK/ios/sdk/MFAuthLib/AppAuth.framework/Headers/OIDErrorUtilities.h