Chrome失败错误代码 [英] Chrome Fail Error Codes

查看:1187
本文介绍了Chrome失败错误代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找一段时间,我无法找到所有未能加载错误代码/ google chrome错误描述的确切列表。


我正在讨论这是突出显示的文字






有人可以给我一个链接吗?

解决方案

我做了一些挖掘,我必须承认,找到所有(Chromium)网络错误代码的完整详尽列表并不容易。 / p>

所有Chromium错误代码的完整列表可以在 net_error_list.h 中找到:
< a href =https://cs.chromium.org/chromium/src/net/base/net_error_list.h =noreferrer> https://cs.chromium.org/chromium/src/net/base/ net_error_list.h



看起来谷歌浏览器在列出的所有代码中预加载 ERR _ 在上面的列表中/ strong>

但是,XHR错误响应中的错误代码略有不同。这些代码遵循POSIX.1-2001定义的linux系统文件 errno.h 的格式,或者C99:
http://man7.org/linux/man-pages/man3/errno.3.html

最后,在NodeJS API文档中列出了一些常见的NodeJS错误:
https://nodejs.org/api/errors.html#errors_common_system_errors



我想用一个简单的比较例子结束这个答案。 操作超时的错误将按照列出的标准命名如下:



  • ERR_TIMED_OUT 显示在Google Chrome中
  • TIMED_OUT 。
  • 在XHR错误对象( error.code )中,
  • ETIMEDOUT



使用您的示例:


  • CONNECTION_REFUSED - >内部使用Chromium

  • ERR_CONNECTION_REFUSED - > / li>
  • ECONNREFUSED - >在linux(POSIX.1)或网络错误堆栈中

    I've been searching for a while now and I can't find the exact list of all fail to load error code/error description of google chrome.

    I'm talking about this the highlighted text



    Can someone give me a link?

    解决方案

    I did some digging and I must admit, it's not easy to find a full exhaustive list of all (Chromium) networking error codes.

    The full list of all Chromium error codes can be found in the file net_error_list.h: https://cs.chromium.org/chromium/src/net/base/net_error_list.h

    It looks like Google Chrome prepends ERR_ to all the codes listed in the above list.

    However, error codes in XHR error responses are slightly different. These codes follow the format of the linux system file errno.h as defined by POSIX.1-2001, or C99: http://man7.org/linux/man-pages/man3/errno.3.html

    Finally, some common NodeJS errors have been listed at the NodeJS API Documentation: https://nodejs.org/api/errors.html#errors_common_system_errors

    I'd like to end this answer with a simple comparison example. The error of an operation timeout would be named as follows by the listed 'standards':

    • TIMED_OUT internally in Chromium.
    • ERR_TIMED_OUT displayed in Google Chrome.
    • ETIMEDOUT in the XHR error object (error.code).

    Using your example:

    • CONNECTION_REFUSED -> internally in Chromium
    • ERR_CONNECTION_REFUSED -> displayed in Google Chrome
    • ECONNREFUSED -> in linux (POSIX.1) or network error stacks

    这篇关于Chrome失败错误代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆