PATH:
opt
/
alt
/
tests
/
alt-php81-pecl-luasandbox_4.1.2-2.el8
/
tests
--TEST-- Exception in a PHP function called from Lua --FILE-- <?php function throw_exception() { throw new Exception('message'); } $sandbox = new LuaSandbox; $sandbox->registerLibrary( 'test', array( 'throw_exception' => 'throw_exception' ) ); $f = $sandbox->loadString('test.throw_exception()'); try { $f->call(); } catch ( Exception $e ) { print $e->getMessage(); } --EXPECT-- message
[-] loadString.phpt
[edit]
[-] lua_catches_php_exception.phpt
[edit]
[-] datatypes-unsupported.phpt
[edit]
[-] profiler-sorting.phpt
[edit]
[-] LuaSandboxFunction_construct.phpt
[edit]
[-] callback_exception.phpt
[edit]
[-] errors-at-call-boundaries.phpt
[edit]
[-] pcall.phpt
[edit]
[+]
..
[-] reentrant.phpt
[edit]
[-] datatypes.phpt
[edit]
[-] array-key-conversion.phpt
[edit]
[-] profiler.phpt
[edit]
[-] call.phpt
[edit]
[-] extending-LuaSandbox.phpt
[edit]
[-] xpcall.phpt
[edit]
[-] ipairs.phpt
[edit]
[-] pairs.phpt
[edit]
[-] dump_loadBinary_call.phpt
[edit]