davglass / cpr

Nodejs cp -R
Other
79 stars 80 forks source link

Errors normalization #5

Closed satazor closed 10 years ago

satazor commented 10 years ago

From what I read from the source code, the errors can actually be a string or an array of strings, which I found very odd from a consumer perspective.

I would suggest to normalize this to always be an array of Error instances. Unlike strings, error instances gives more information about the actual error. For instance, we can get a stack trace from it if necessary.

If you guys agree with this, I will make a PR with these changes. This is an API change which translates in a major release bump.

davglass commented 10 years ago

Sure, send a PR and add tests for it :)