mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 12:51:52 +00:00
23 lines
426 B
PHP
23 lines
426 B
PHP
--TEST--
|
|
Test V8Function::__call() : Check v8::TryCatch behaviour
|
|
--SKIPIF--
|
|
<?php
|
|
require_once(dirname(__FILE__) . '/skipif.inc');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$sandbox = new V8Js();
|
|
|
|
$cb = $sandbox->executeString('(function() { return oh; });');
|
|
|
|
try {
|
|
$cb();
|
|
} catch(\Exception $e) {
|
|
echo "caught: ".$e->getMessage()."\n";
|
|
}
|
|
?>
|
|
===EOF===
|
|
--EXPECT--
|
|
caught: V8Js::compileString():1: ReferenceError: oh is not defined
|
|
===EOF===
|