diff options
author | Sakthipriyan Vairamani <thechargingvolcano@gmail.com> | 2015-06-02 18:13:46 +0300 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2015-06-11 01:51:46 +0300 |
commit | 09f2a67bd82faf67229dd7e9a9c45e3f1b3f6c17 (patch) | |
tree | d5b4c8aefc438ff43cf700a047fe060707a3f455 /src/fs_event_wrap.cc | |
parent | cf5020fc025cba38668b45949a29b5c480e94e3f (diff) |
fs: improve error message descriptions
1. Change "Bad arguments" error messages to a more helpful message
"options should either be an object or a string".
2. Make braces consistent.
3. Return meaningful error message from fs_event_wrap's
FSEvent's Start function.
PR-URL: https://github.com/nodejs/io.js/pull/1870
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'src/fs_event_wrap.cc')
-rw-r--r-- | src/fs_event_wrap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc index 1719942ce3e..a6ceff2776d 100644 --- a/src/fs_event_wrap.cc +++ b/src/fs_event_wrap.cc @@ -86,7 +86,7 @@ void FSEventWrap::Start(const FunctionCallbackInfo<Value>& args) { FSEventWrap* wrap = Unwrap<FSEventWrap>(args.Holder()); if (args.Length() < 1 || !args[0]->IsString()) { - return env->ThrowTypeError("Bad arguments"); + return env->ThrowTypeError("filename must be a valid string"); } node::Utf8Value path(env->isolate(), args[0]); |