From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../global_objects/internalerror/index.html | 123 +++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 files/zh-cn/web/javascript/reference/global_objects/internalerror/index.html (limited to 'files/zh-cn/web/javascript/reference/global_objects/internalerror') diff --git a/files/zh-cn/web/javascript/reference/global_objects/internalerror/index.html b/files/zh-cn/web/javascript/reference/global_objects/internalerror/index.html new file mode 100644 index 0000000000..e0f98013f9 --- /dev/null +++ b/files/zh-cn/web/javascript/reference/global_objects/internalerror/index.html @@ -0,0 +1,123 @@ +--- +title: InternalError +slug: Web/JavaScript/Reference/Global_Objects/InternalError +tags: + - InternalError + - 内部错误 +translation_of: Web/JavaScript/Reference/Global_Objects/InternalError +--- +
{{JSRef}} {{non-standard_header}}
+ +

InternalError 对象表示出现在JavaScript引擎内部的错误。 例如: "InternalError: too much recursion"(内部错误:递归过深)。

+ +

语法

+ +
new InternalError([message[, fileName[, lineNumber]]])
+ +

参数

+ +
+
message
+
可选。 人类可读的错误描述信息。
+
fileName {{non-standard_inline}}
+
可选。触发该错误的代码所在文件的文件名。
+
lineNumber {{non-standard_inline}}
+
可选。触发该错误的代码所在的代码行号。
+
+ +

描述

+ +

当JavaScript引擎出现内部错误时将会抛出InternalError。

+ +

示例场景通常为某些成分过大,例如:

+ + + +

属性

+ +
+
{{jsxref("InternalError.prototype")}}
+
允许向InternalError对象添加属性。
+
+ +

方法

+ +

全局 InternalError 对象自身不包含任何方法,但从原型链中继承了一些方法.

+ +

InternalError 实例

+ +

属性

+ +
{{page('/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError/prototype', '属性')}}
+ +

方法

+ +
{{page('/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError/prototype', '方法')}}
+ +

规范

+ +

尚未成为任何规范的一部分。

+ +

浏览器兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
基本支持{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
基本支持{{CompatNo}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

相关链接

+ + -- cgit v1.2.3-54-g00ecf