Lines Matching refs:error
45 NSError *error;
46 FRAMechanism *mechanism = [_mechanismReader parseFromString:code handler:[self mechanismReadCallback] error:&error];
52 if (error && error.code == FRADuplicateMechanism) {
53 [self handleDuplicateMechanism:code error:&error];
58 [self showAlert:error];
93 * @param error If an error occurs, upon returns contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.
95 - (void)handleDuplicateMechanism:(NSString *)code error:(NSError *__autoreleasing*)error {
96 FRAIdentity *identity = [(*error).userInfo valueForKey:@"identity"];
97 FRAMechanism *duplicateMechanism = [(*error).userInfo valueForKey:@"mechanism"];
103 handler:[self duplicateMechanismCallback:code identity:identity mechanism:duplicateMechanism error:error]];
113 * @param error If an error occurs, upon returns contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.
116 - (void(^)(NSInteger))duplicateMechanismCallback:(NSString *)code identity:(FRAIdentity *)identity mechanism:(FRAMechanism *)mechanism error:(NSError *__autoreleasing*) error {
120 BOOL successfullyRemoved =[identity removeMechanism:mechanism error:error];
122 [_mechanismReader parseFromString:code handler:[self mechanismReadCallback] error:error];
136 return ^(BOOL success, NSError *error) {
139 [self showAlert:error];
147 * @param error The error to display to the user.
150 - (void)showAlert:(NSError *)error {
152 message:[self errorMessage:error]
161 * Gets the localized error message to display to the user.
163 * @param error The error to display to the user.
166 - (NSString *)errorMessage:(NSError *)error {
167 if (!error) {
171 switch (error.code) {