ARTErrorChecker
Objective-C
@protocol ARTErrorChecker
Swift
protocol ErrorChecker
Checks an ARTErrorInfo
to see whether it falls into a given class of errors defined by the client library specification.
In addition to putting shared error logic in a common place, it allows us to provide a mock instance when testing components that need to perform error checking, without having to worry about creating representative errors in our test cases.
-
Returns whether the given error is a token error, as defined by RTH15h1.
Declaration
Objective-C
- (BOOL)isTokenError:(nonnull ARTErrorInfo *)errorInfo;
Swift
func isTokenError(_ errorInfo: ARTErrorInfo) -> Bool