Skip to content

Commit

Permalink
[env] Fix ThrowError
Browse files Browse the repository at this point in the history
Error introduced when resolving merge-conflict.
  • Loading branch information
pthier committed Jul 15, 2024
1 parent 8a327fb commit ef12467
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/env-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,9 @@ inline void Environment::ThrowRangeError(const char* errmsg) {
v8::Exception::RangeError(OneByteString(isolate(), errmsg)));
}

inline void Environment::ThrowError(V8ExceptionConstructorNew fun,
const char* errmsg) {
inline void Environment::ThrowError(
v8::Local<v8::Value> (*fun)(v8::Local<v8::String>, v8::Local<v8::Value>),
const char* errmsg) {
v8::HandleScope handle_scope(isolate());
isolate()->ThrowException(fun(OneByteString(isolate(), errmsg), {}));
}
Expand Down

0 comments on commit ef12467

Please sign in to comment.