16 Errors
This specification specifies the last possible moment an error occurs. A given implementation may generate errors sooner (e.g., at compile-time). Doing so may cause differences in behaviour among implementations. Notably, if runtime errors become catchable in future versions, a given error would not be catchable if an implementation generates the error at compile-time rather than runtime.
An ECMAScript compiler should detect errors at compile time in all code presented to it, even code that detailed analysis might prove to be "dead" (never executed). A programmer should not rely on the trick of placing code within an if (false) statement, for example, to try to suppress compile-time error detection.
In general, if a compiler can prove that a construct cannot execute without error under any circumstances, then it may issue a compile-time error even though the construct might never be executed at all.
Printed copies can be ordered from:
ECMA
114 Rue du Rhône CH-1204 Geneva Switzerland
Fax: +41 22 849.60.01 Internet: documents@ecma.ch
Files can be downloaded from our FTP site, ftp.ecma.ch . This Standard is available from library ECMA-ST as a compacted, self-expanding file in MSWord 6.0 format (file E262-DOC.EXE) and as an Acrobat PDF file (file E262- PDF.PDF). File E262-EXP.TXT gives a short presentation of the Standard.
Our web site, http://www.ecma.ch, gives full information on ECMA, ECMA activities, ECMA Standards and Technical Reports.
ECMA
114 Rue du Rhône CH-1204 Geneva Switzerland
This Standard ECMA-262 is available free of charge in printed form and as a file.
See inside cover page for instructions