Skip to content

Commit

Permalink
Fix ThrowError
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwang committed Oct 31, 2023
1 parent 622cf53 commit f32e4e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/env-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -796,10 +796,10 @@ inline void Environment::ThrowRangeError(const char* errmsg) {
}

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

inline void Environment::ThrowErrnoException(int errorno,
Expand Down
2 changes: 1 addition & 1 deletion src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ class Environment : public MemoryRetainer {
};

private:
inline void ThrowError(v8::Local<v8::Value> (*fun)(v8::Local<v8::String>),
inline void ThrowError(v8::Local<v8::Value> (*fun)(v8::Local<v8::String>, v8::Local<v8::Value>),
const char* errmsg);
void TrackContext(v8::Local<v8::Context> context);
void UntrackContext(v8::Local<v8::Context> context);
Expand Down

0 comments on commit f32e4e9

Please sign in to comment.