-
-
Notifications
You must be signed in to change notification settings - Fork 878
Improve error messages when creating an invalid PFFile. #338
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
Comments
Sounds great! Let's do it! + (instancetype)fileWithName:(PF_NULLABLE NSString *)name
data:(NSData *)data
contentType:(PF_NULLABLE NSString *)contentType
error:(NSError **)error; Which returns What do you think if we take this approach:
|
This is probably an example of the method signature that we are aiming for in Swift: + (PF_NULLABLE instancetype)fileWithName:(PF_NULLABLE NSString *)name
data:(NSData *)data
contentType:(PF_NULLABLE NSString *)contentType PF_SWIFT_UNAVAILABLE;
+ (PF_NULLABLE instancetype)fileWithName:(PF_NULLABLE NSString *)name
data:(NSData *)data
contentType:(PF_NULLABLE NSString *)contentType
error:(NSError **)error; |
Switching to errors provides a more consistent interface, as we should never use exceptions in objective-c except for unrecoverable errors. Fixes #338.
Switching to errors provides a more consistent interface, as we should never use exceptions in objective-c except for unrecoverable errors. Fixes #338.
Switching to errors provides a more consistent interface, as we should never use exceptions in objective-c except for unrecoverable errors. Fixes #338.
The label |
Currently, if you attempt to create a
PFFile
with anil
NSData parameter, you get a strange 'file not found' error when attempting to save it to Parse.Let's make this either
nil
, when invalid data is passed in.Somewhat relates to #6.
The text was updated successfully, but these errors were encountered: