This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
Messy error returns: Sometimes a string, sometimes an Error object #468
Closed
Description
Looking at all reject()
calls in https://github.com/wkh237/react-native-fetch-blob/blob/master/fs.js
Some have a string as argument, many others first do a new Error()
around the string message (better - stacktrace is created).
Sometimes there is contradiction for the same error message:
return Promise.reject(new Error('Invalid argument "path" '))
return Promise.reject('Invalid argument "path" ')
RNFetchBlobWriteStream
again uses strings for the reject-value in both its methods (write, close).
I would like to propose to use new Error(message)
- always.
Metadata
Metadata
Assignees
Labels
No labels