You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
First of thanks for maintaining this library!
Are there any plans on changing from
NSError
toSwift.Error
?Currently I need to cast errors I get back from APIs or are thrown by throwing APIs from
Error
toNSError
to be able to pass it to e.g.PSOperation.finishWithError(error:)
. SinceNSError
also conforms toError
it shouldn't be too complicated to switch. Also currently allSwift.Errors
can be casted back to anNSError
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 thanNSError
'suserInfo
.The text was updated successfully, but these errors were encountered: