--TEST-- Test V8::setExceptionFilter() : Filter handling on exception in setModuleLoader --SKIPIF-- --FILE-- setModuleLoader(function ($path) { throw new Error('moep'); }); $v8->setExceptionFilter(function (Throwable $ex) { echo "exception filter called.\n"; return $ex->getMessage(); }); $v8->executeString(' try { require("file"); } catch(e) { var_dump(e); } ', null, V8Js::FLAG_PROPAGATE_PHP_EXCEPTIONS); ?> ===EOF=== --EXPECT-- exception filter called. string(4) "moep" ===EOF===