From d44f5032d0f53256b2d5aef505d6b593fd3cd158 Mon Sep 17 00:00:00 2001 From: Irvin Date: Wed, 16 Feb 2022 02:14:18 +0800 Subject: fix yari h2m dry run errors (zh-CN) --- .../reference/global_objects/error/index.html | 44 +--------------------- 1 file changed, 1 insertion(+), 43 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/error/index.html') diff --git a/files/zh-cn/web/javascript/reference/global_objects/error/index.html b/files/zh-cn/web/javascript/reference/global_objects/error/index.html index 80da68f766..2717020571 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/error/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/error/index.html @@ -121,7 +121,7 @@ const y = new Error('I was constructed via the "new" keyword!');

你可能希望自定义基于Error的异常类型,使得你能够 throw new MyError() 并可以使用 instanceof MyError 来检查某个异常的类型. 这种需求的通用解决方法如下.

-

注意,在FireFox中抛出自定义类型的异常会显示不正确的行号和文件名。

+

警告:注意,在FireFox中抛出自定义类型的异常会显示不正确的行号和文件名。

参考 "What's a good way to extend Error in JavaScript?" discussion on Stackoverflow.

@@ -149,48 +149,6 @@ try { console.log(e.message); // 'custom message' } -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-

规范

-- cgit v1.2.3-54-g00ecf