mirror of
https://github.com/phpv8/v8js.git
synced 2024-11-14 07:18:40 +00:00
18 lines
402 B
PHP
18 lines
402 B
PHP
--TEST--
|
|
Test V8Js::setModuleLoader : Handle fatal errors gracefully
|
|
--SKIPIF--
|
|
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
$v8 = new V8Js();
|
|
|
|
$v8->setModuleLoader(function() {
|
|
trigger_error('some fatal error', E_USER_ERROR);
|
|
});
|
|
|
|
$v8->executeString(' require("foo"); ');
|
|
?>
|
|
===EOF===
|
|
--EXPECTF--
|
|
Fatal error: some fatal error in %s%ecommonjs_fatal_error.php on line 5
|