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;
}
Aggregations