Skip to content

Commit

Permalink
Apply okadan#84
Browse files Browse the repository at this point in the history
  • Loading branch information
Serjlee committed Sep 9, 2022
1 parent abffea8 commit 22a1133
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ios/Classes/Translator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,10 @@ func getErrorMap(_ arg: Error) -> [String : Any?] {
}

func getFlutterError(_ arg: Error) -> FlutterError {
return FlutterError(code: "\((arg as NSError).code)", message:arg.localizedDescription, details: nil)
}
let error = arg as NSError;
if let isoError = error.userInfo[NFCISO15693TagResponseErrorKey] {
return FlutterError(code: "\(isoError)", message:error.localizedDescription, details: nil);
} else {
return FlutterError(code: "\(error.code)", message:error.localizedDescription, details: nil);
}
}

0 comments on commit 22a1133

Please sign in to comment.