diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 76a733311b0eb0..b3db920d0b1498 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -409,7 +409,7 @@ void Create(const FunctionCallbackInfo& args) { if (length > 0) { data = malloc(length); if (data == nullptr) - return env->ThrowRangeError("invalid Buffer length"); + return env->ThrowRangeError("Buffer allocation failed - process out of memory"); } else { data = nullptr; }