void (CefBrowser browser, CefFrame frame, ErrorCode errorCode, String errorText, String failedUrl) { // do not show error page if another URL has already been requested to load ErrorPage errorPage = myErrorPage; String lastRequestedUrl = getLastRequestedUrl(); if (errorPage != null && lastRequestedUrl.equals(failedUrl)) { String html = errorPage.create(errorCode, errorText, failedUrl); if (html != null) UIUtil.invokeLaterIfNeeded(() -> compareLastRequestedUrlAndPerform(failedUrl, () -> loadHTML(html))); } }