抑制“无法加载资源:net :: ERR_FILE_NOT_FOUND”在Chrome打包应用程序中 [英] Suppress "Failed to load resource: net::ERR_FILE_NOT_FOUND" in Chrome Packaged App
问题描述
当Chrome Packaged App中的webview尝试加载不存在的本地文件时,我在控制台中收到消息无法加载资源:net :: ERR_FILE_NOT_FOUND。这是预料之中的,因为程序应该检查几个不同的位置,从本地系统开始,然后切换到远程服务器作为第二次尝试。
问题是控制台中有很多这些消息,这使得使用控制台非常困难。
有没有方法可以将此消息关闭?
是的,您可以关闭此功能:
点击控制台顶部的过滤器图标,然后勾选隐藏网络消息。
You can not ,但是,阻止这个错误根本不存在:它不是由JS中未捕获的异常产生的,而是从Chrome的网络堆栈中报告的。
I get the message "Failed to load resource: net::ERR_FILE_NOT_FOUND" in the console when a webview in a Chrome Packaged App tries to load a non-existent local file. This is expected, because the program is supposed to check a couple of different location, starting with the local system and then switching to a remote server as a second try.
The problem is that there are a lot of these messages in the console, which makes it very difficult to use the console for anything else.
Is there a way to turn this message off?
Yes, you can turn this off:
Click on the filter icon at the top of the console, and tick "Hide network messages".
You can't, however, prevent this error from happening at all: it's not generated by an uncaught exception in JS but is reported from the network stack of Chrome.
这篇关于抑制“无法加载资源:net :: ERR_FILE_NOT_FOUND”在Chrome打包应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!