src: pass along errors from object instantiations
Calling Function::NewInstance()
can always fail in the presence of termination exceptions, so we need to check for error conditions when calling it.
This PR does not address all of those cases, but at least some of them.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines