Skip to content

Commit

Permalink
src: adapt to v8::Exception API change
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Nov 4, 2023
1 parent 66bb80e commit e6f12b0
Show file tree
Hide file tree
Showing 2 changed files with 4 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 @@ -776,10 +776,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>),
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
3 changes: 2 additions & 1 deletion src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,8 @@ 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 e6f12b0

Please sign in to comment.