crypto: clarify RandomBytes() error msg

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
pull/23396/head
Mickael van der Beek 2014-09-17 14:40:01 -07:00 committed by Trevor Norris
parent 03e93526e6
commit c615545416
1 changed files with 1 additions and 1 deletions

View File

@ -4723,7 +4723,7 @@ void RandomBytes(const FunctionCallbackInfo<Value>& args) {
// maybe allow a buffer to write to? cuts down on object creation
// when generating random data in a loop
if (!args[0]->IsUint32()) {
return env->ThrowTypeError("Argument #1 must be number > 0");
return env->ThrowTypeError("size must be a number >= 0");
}
const uint32_t size = args[0]->Uint32Value();