Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Swift Errors #86

Closed
ffried opened this issue Jan 24, 2017 · 1 comment
Closed

Swift Errors #86

ffried opened this issue Jan 24, 2017 · 1 comment

Comments

@ffried
Copy link
Contributor

ffried commented Jan 24, 2017

First of thanks for maintaining this library!

Are there any plans on changing from NSError to Swift.Error?
Currently I need to cast errors I get back from APIs or are thrown by throwing APIs from Error to NSError to be able to pass it to e.g. PSOperation.finishWithError(error:). Since NSError also conforms to Error it shouldn't be too complicated to switch. Also currently all Swift.Errors can be casted back to an NSError if that should be really necessary.
This would also allow more specific error types (e.g. PSOperation.Error) which could provide "safer" access to error details than NSError's userInfo.

@ffried
Copy link
Contributor Author

ffried commented Feb 24, 2017

Closing this in favor of #88.

@ffried ffried closed this as completed Feb 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant