-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensembles; Handling errors #267
Comments
Would think you just cast to CDEErrorCode.
|
You make it sound so simple. Many thanks. |
For the benefit of anyone missing the point like I did: |
There are similarities to &&, but indeed not the same. It evaluates each condition in turn, and will not proceed unless they are all true. That much is the same. But they are separate statements, and evaluated separately. Effectively, you are doing this:
|
I'd very much like to handle the error 'CDEErrorCode.cloudIdentityChange' as a run-time alert, but cannot get any line to work. Logic would suggest the following in the completion block:
But the 'if error == ...' line returns the message, " Binary operator '==' cannot be applied to operands of type 'Error?' and 'CDEErrorCode' "
Have tried many variants & type casts to no avail. Suggestions would be hugely appreciated.
PS This is Swift 3, with Ensembles v1.7.1. Everything works wonderfully, just can't catch this error specifically.
The text was updated successfully, but these errors were encountered: