diff options
author | Florian Merz <me@fiji-flo.de> | 2021-02-11 12:56:40 +0100 |
---|---|---|
committer | Florian Merz <me@fiji-flo.de> | 2021-02-11 12:56:40 +0100 |
commit | 310fd066e91f454b990372ffa30e803cc8120975 (patch) | |
tree | d5d900deb656a5da18e0b60d00f0db73f3a2e88e /files/zh-cn/web/javascript/reference/global_objects/error | |
parent | 8260a606c143e6b55a467edf017a56bdcd6cba7e (diff) | |
download | translated-content-310fd066e91f454b990372ffa30e803cc8120975.tar.gz translated-content-310fd066e91f454b990372ffa30e803cc8120975.tar.bz2 translated-content-310fd066e91f454b990372ffa30e803cc8120975.zip |
unslug zh-cn: move
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/error')
-rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/error/prototype/index.html | 162 |
1 files changed, 0 insertions, 162 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/error/prototype/index.html b/files/zh-cn/web/javascript/reference/global_objects/error/prototype/index.html deleted file mode 100644 index 420b5634de..0000000000 --- a/files/zh-cn/web/javascript/reference/global_objects/error/prototype/index.html +++ /dev/null @@ -1,162 +0,0 @@ ---- -title: Error.prototype -slug: Web/JavaScript/Reference/Global_Objects/Error/prototype -tags: - - Error - - JavaScript - - Property - - 参考 - - 属性 -translation_of: Web/JavaScript/Reference/Global_Objects/Error -translation_of_original: Web/JavaScript/Reference/Global_Objects/Error/prototype ---- -<div> -<p>{{JSRef}}</p> - -<p><code><strong>Error.prototype</strong></code> 属性代表 {{jsxref("Error")}} 的构造器。</p> - -<p>{{js_property_attributes(0, 0, 0)}}</p> -</div> - -<h2 id="Description" name="Description">描述</h2> - -<p>所有 {{jsxref("Global_Objects/Error", "Error")}} 与 {{jsxref("Global_Objects/Error", "非标准Error", "#Error_types", 1)}} 的实例都继承自 <code>Error.prototype。同所有构造器函数一样,你可以在构造器的 </code>prototype 上添加属性或者方法,使其在所有该构造器的实例上生效。</p> - -<h2 id="Properties" name="Properties">属性</h2> - -<h3 id="Standard_properties" name="Standard_properties">标准属性</h3> - -<dl> - <dt><code>Error.prototype.constructor</code></dt> - <dd>实例原型的构造函数。</dd> - <dt>{{jsxref("Error.prototype.message")}}</dt> - <dd>错误信息。</dd> - <dt>{{jsxref("Error.prototype.name")}}</dt> - <dd>错误名。</dd> -</dl> - -<h3 id="Vendor-specific_extensions" name="Vendor-specific_extensions">厂商特定扩展属性</h3> - -<div>{{non-standard_header}}</div> - -<h4 id="Microsoft" name="Microsoft">Microsoft</h4> - -<dl> - <dt>{{jsxref("Error.prototype.description")}}</dt> - <dd>错误描述,与 {{jsxref("Error.prototype.message", "message")}} 相似。</dd> - <dt>{{jsxref("Error.prototype.number")}}</dt> - <dd>错误码。</dd> -</dl> - -<h4 id="Mozilla" name="Mozilla">Mozilla</h4> - -<dl> - <dt>{{jsxref("Error.prototype.fileName")}}</dt> - <dd>产生该错误的文件名。</dd> - <dt>{{jsxref("Error.prototype.lineNumber")}}</dt> - <dd>产生该错误的行号。</dd> - <dt>{{jsxref("Error.prototype.columnNumber")}}</dt> - <dd>产生该错误的列号。</dd> - <dt>{{jsxref("Error.prototype.stack")}}</dt> - <dd>错误堆栈。</dd> -</dl> - -<h2 id="Methods" name="Methods">方法</h2> - -<dl> - <dt>{{jsxref("Error.prototype.toSource()")}} {{non-standard_inline}}</dt> - <dd>返回一个包含特定 {{jsxref("Error")}} 对象的源代码字符串,你可以用该值新建一个新的对象,重写自 {{jsxref("Object.prototype.toSource()")}} 方法。</dd> - <dt>{{jsxref("Error.prototype.toString()")}}</dt> - <dd>返回一个表示该对象的字符串,重写自 {{jsxref("Object.prototype.toString()")}} 方法。</dd> -</dl> - -<h2 id="规范">规范</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">规范版本</th> - <th scope="col">状态</th> - <th scope="col">注解</th> - </tr> - <tr> - <td>{{SpecName('ES1')}}</td> - <td>{{Spec2('ES1')}}</td> - <td>Initial definition. Implemented in JavaScript 1.1.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.11.3.1', 'Error')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-error.prototype', 'Error')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ESDraft', '#sec-error.prototype', 'Error')}}</td> - <td>{{Spec2('ESDraft')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="浏览器兼容性">浏览器兼容性</h2> - -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="See_also" name="See_also">参见</h2> - -<ul> - <li>{{jsxref("Error")}}</li> - <li>{{jsxref("Object.prototype")}}</li> -</ul> |