summaryrefslogtreecommitdiff
path: root/core/libdeno/exceptions.cc
diff options
context:
space:
mode:
authorMichaƂ Sabiniarz <31597105+mhvsa@users.noreply.github.com>2019-06-07 02:51:04 +0100
committerRyan Dahl <ry@tinyclouds.org>2019-06-06 21:51:04 -0400
commit9bea576f3ea224ec72f371f6f0bc582171ca7890 (patch)
tree17a0dbfd8f463ca93e7240e13ec6cbf2bad4b751 /core/libdeno/exceptions.cc
parente3b2205eba2851380a9a149071cb4fb7e8218b13 (diff)
Deno.core.evalContext & Deno.core.print fix (#2465)
Diffstat (limited to 'core/libdeno/exceptions.cc')
-rw-r--r--core/libdeno/exceptions.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/libdeno/exceptions.cc b/core/libdeno/exceptions.cc
index 85f0ca340..8f5779acd 100644
--- a/core/libdeno/exceptions.cc
+++ b/core/libdeno/exceptions.cc
@@ -214,4 +214,9 @@ void HandleExceptionMessage(v8::Local<v8::Context> context,
CHECK_NOT_NULL(d);
d->last_exception_ = json_str;
}
+
+void ThrowInvalidArgument(v8::Isolate* isolate) {
+ isolate->ThrowException(v8::Exception::TypeError(v8_str("Invalid Argument")));
+}
+
} // namespace deno