EvalError

  • 版本网址缩略名: Core_JavaScript_1.5_Reference/Global_Objects/EvalError
  • 版本标题: EvalError
  • 版本 id: 146427
  • 创建于:
  • 创建者: Mickeyboy
  • 是否是当前版本?
  • 评论 page created, 163 words added

修订内容

 

摘要

Represents an error regarding the eval function.

语法

new EvalError([message[, fileName{{ mediawiki.external(', lineNumber') }}]])

参数

message
Human-readable description of the error
fileName
{{ Non-standard_inline() }}
The name of the file containing the code that caused the exception
lineNumber
{{ Non-standard_inline() }}
The line number of the code that caused the exception

描述

An EvalError is thrown when eval is used improperly.

属性

{{ Js_see_prototype("EvalError", "Properties") }}

prototype
Allows the addition of properties to an EvalError object.

{{ JSInherits("Function", "Properties", "caller", "constructor", "length", "name") }}

方法

{{ Js_see_prototype("EvalError", "Methods") }}

The global EvalError contains no methods of its own, however, it does inherit some methods through the prototype chain.

{{ JSInherits("Function", "Methods", "apply", "call", "toSource", "toString", "valueOf") }}

{{ JSInherits("Object", "Methods", "__defineGetter__", "__defineSetter__", "hasOwnProperty", "isPrototypeOf", "__lookupGetter__", "__lookupSetter__", "__noSuchMethod__", "propertyIsEnumerable", "unwatch", "watch") }}

EvalError instances

{{ :en/Core_JavaScript_1.5_Reference/Global_Objects/EvalError/prototype() }}

参见

修订版来源

<p> </p>
<h3 id="Summary" name="Summary">摘要</h3>
<p>Represents an error regarding the <a href="/en/Core_JavaScript_1.5_Reference/Global_Functions/eval" title="en/Core_JavaScript_1.5_Reference/Global_Functions/eval">eval</a> function.</p>
<h3 id="Syntax" name="Syntax">语法</h3>
<p><code>new EvalError([<em>message</em>[, <em>fileName</em>{{ mediawiki.external(', <i>lineNumber</i>') }}]])</code></p>
<h3 id="Parameters" name="Parameters">参数</h3>
<dl><dt> message </dt><dd> Human-readable description of the error </dd></dl> <dl><dt> fileName </dt><dd> {{ Non-standard_inline() }} </dd><dd> The name of the file containing the code that caused the exception </dd></dl> <dl><dt> lineNumber </dt><dd> {{ Non-standard_inline() }} </dd><dd> The line number of the code that caused the exception </dd></dl>
<h3 id="Description" name="Description">描述</h3>
<p>An EvalError is thrown when <code><a href="/en/Core_JavaScript_1.5_Reference/Global_Functions/eval" title="en/Core_JavaScript_1.5_Reference/Global_Functions/eval">eval</a></code> is used improperly.</p>
<h3 id="Properties" name="Properties">属性</h3>
<p>{{ Js_see_prototype("EvalError", "Properties") }}</p>
<dl><dt> <a href="/en/Core_JavaScript_1.5_Reference/Global_Objects/EvalError/prototype" title="en/Core_JavaScript_1.5_Reference/Global_Objects/EvalError/prototype">prototype</a> </dt><dd> Allows the addition of properties to an EvalError object. </dd></dl>
<p>{{ JSInherits("Function", "Properties", "caller", "constructor", "length", "name") }}</p>
<h3 id="Methods" name="Methods">方法</h3>
<p>{{ Js_see_prototype("EvalError", "Methods") }}</p>
<p>The global <code>EvalError</code> contains no methods of its own, however, it does inherit some methods through the prototype chain.</p>
<p>{{ JSInherits("Function", "Methods", "apply", "call", "toSource", "toString", "valueOf") }}</p>
<p>{{ JSInherits("Object", "Methods", "__defineGetter__", "__defineSetter__", "hasOwnProperty", "isPrototypeOf", "__lookupGetter__", "__lookupSetter__", "__noSuchMethod__", "propertyIsEnumerable", "unwatch", "watch") }}</p>
<h3 id="EvalError_instances" name="EvalError_instances"><code>EvalError</code> instances</h3>
<p>{{ :en/Core_JavaScript_1.5_Reference/Global_Objects/EvalError/prototype() }}</p>
<h3 id="See_also" name="See_also">参见</h3>
<ul> <li><a href="/en/Core_JavaScript_1.5_Reference/Global_Objects/Error" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Error">Error</a></li> <li><a href="/en/Core_JavaScript_1.5_Reference/Global_Functions/eval" title="en/Core_JavaScript_1.5_Reference/Global_Functions/eval">eval</a></li> <li><a href="/en/Core_JavaScript_1.5_Reference/Global_Objects/EvalError/prototype" title="en/Core_JavaScript_1.5_Reference/Global_Objects/EvalError/prototype">EvalError.prototype</a></li>
</ul>
恢复到这个版本