public void error(TraceInfo trace, ErrorType type, Messages.Item message, Object... args) {
        if (type.isFatal()) {
            if (scope.getLangMode() == LangMode.MODERN) {
                if (type == E_PARSE) {
                    exception(trace, new BaseParseError(this), message.fetch(args));
                } else {
                    exception(trace, new BaseError(this, type), message.fetch(args));
                }
            }

            if (type.isHandled() && errorHandler != null && ErrorType.check(errorHandler.errorHandlerFlags, type)) {
                triggerMessage(new CustomSystemMessage(type, new CallStackItem(trace), message, args));
            } else
                triggerError(new CustomErrorException(type, message.fetch(args), trace));
        } else {
            triggerMessage(new CustomSystemMessage(type, new CallStackItem(trace), message, args));
        }
    }
Remove all method which does not destruct

@throws Throwable
jphp-runtime/src/php/runtime/env/Environment.java