Search in sources :

Example 1 with ExceptionHandler

use of php.runtime.env.handler.ExceptionHandler in project jphp by jphp-compiler.

the class LangFunctions method set_exception_handler.

public static Memory set_exception_handler(Environment env, TraceInfo trace, @Runtime.Reference Memory handler) {
    Invoker invoker = expectingCallback(env, trace, 1, handler);
    if (invoker != null) {
        ExceptionHandler eh = env.getExceptionHandler();
        env.setExceptionHandler(new ExceptionHandler(invoker, handler.toImmutable()));
        return eh == null || eh.invoker == null ? Memory.NULL : eh.invokerMemory;
    } else
        return Memory.FALSE;
}
Also used : ExceptionHandler(php.runtime.env.handler.ExceptionHandler) Invoker(php.runtime.invoke.Invoker)

Aggregations

ExceptionHandler (php.runtime.env.handler.ExceptionHandler)1 Invoker (php.runtime.invoke.Invoker)1