fs: replace bad_args macro with concrete error msg
authorRoman Klauke <romankl@users.noreply.github.com>
Sat, 22 Aug 2015 17:19:14 +0000 (19:19 +0200)
committerSakthipriyan Vairamani <thechargingvolcano@gmail.com>
Sat, 22 Aug 2015 20:39:49 +0000 (02:09 +0530)
commitb125ad186c1a29b5633ad1dd6a5bbe804bf33842
tree76ebcccaeee180f287fd1a0d199b4d1207b94e9a
parent31188b796ed56be22d9bc725422b5ef1386241b9
fs: replace bad_args macro with concrete error msg

Instead of throwing an error with `Bad arguments` the fs methods
return a concrete error message. If an argument is missing, the
methods throw an error with the information, what is missing.
In case of a type mismatch, they throw an error with some hints,
what datatype is expected.

PR-URL: https://github.com/nodejs/node/pull/2495
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
src/node_file.cc