17 Error Handling and Language Extensions

implementation은 대부분의 error를 relevant ECMAScript language construct가 evaluated되는 time에 report해야 합니다. early error는 error를 contain하는 Script 안의 어떤 construct도 evaluation되기 전에 detect 및 report될 수 있는 error입니다. early error가 존재하면 construct의 evaluation은 prevented됩니다. implementation은 Script 안의 early errorParseScript에서 해당 Script를 parsing하는 part로 report해야 합니다. Module 안의 early errorModule이 evaluated될 point에서 report되며 Module은 never initialized됩니다. eval code 안의 early erroreval이 called되는 time에 report되고 eval code의 evaluation을 prevent합니다. early error가 아닌 모든 error는 runtime error입니다.

implementation은 이 specification의 “Static Semantics: Early Errors” subclause에 listed된 condition의 occurrence를 early error로 report해야 합니다.

compiler가 construct가 어떤 circumstance에서도 error 없이 execute될 수 없음을 prove할 수 있더라도, implementation은 other kinds of errors를 early error로 treat해서는 안 됩니다. implementation은 such case에 early warning을 issue할 수 있지만, relevant construct가 actually executed될 때까지 error를 report해서는 안 됩니다.

implementation은 다음을 제외하고 specified된 대로 모든 error를 report해야 합니다:

17.1 Forbidden Extensions

implementation은 다음 ways로 이 specification을 extend해서는 안 됩니다: