Closed NINI1988 closed 6 years ago
I don't think
v8::Isolate::GetCurrent()->ThrowException(
+ v8::Exception::TypeError(String::NewFromUtf8(v8::Isolate::GetCurrent(), ss.str().c_str())));
works from in the FIle::Fie constructor
I'm working on these right now. The other place will probably work
I merged the changes from src/methods.cc
ThrowException works for me in the constructor.
https://v8docs.nodesource.com/node-8.9/d5/dda/classv8_1_1_isolate.html#af8c2d2fd12d59ddb2c0658f032de4404 only schedules a javascript exception which happens when a return to js happens. That's why in c++ I do a c++ exception which catches back to where ThrowException is scheduled and a return on args is possible:
void File::New(const v8::FunctionCallbackInfo<Value>& args) {
the args that had dropped in from js in the first place.
The derived NodeHDF5::Exception is reliable now
Fix two errors.