summaryrefslogtreecommitdiff
path: root/src/stream_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream_base.cc')
-rw-r--r--src/stream_base.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stream_base.cc b/src/stream_base.cc
index 880e1a968d..801b7f4b2f 100644
--- a/src/stream_base.cc
+++ b/src/stream_base.cc
@@ -3,6 +3,7 @@
#include "node.h"
#include "node_buffer.h"
+#include "node_errors.h"
#include "node_internals.h"
#include "env-inl.h"
#include "js_stream.h"
@@ -175,7 +176,7 @@ int StreamBase::WriteBuffer(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
if (!args[1]->IsUint8Array()) {
- env->ThrowTypeError("Second argument must be a buffer");
+ node::THROW_ERR_INVALID_ARG_TYPE(env, "Second argument must be a buffer");
return 0;
}