2 PP0023
Nikolai Tillmann edited this page 2018-02-07 17:33:09 -08:00

Program may terminate with exception

Prepack transforms one JavaScript program into another by partially evaluating its behavior. If the original program throws or may throw an exception as part of the execution of the global code, then Prepack will produce an equivalent program that will also throw such an exception. However, it is unlikely that the program is meant to throw an exception. When Prepack detects that a program may terminate because of an exception, then Prepack will emit this warning.

Consider always wrapping your potentially exception throwing code in try/catch statements. If you don't expect your program to throw exceptions, inspect the prepacked program for spurious top-level throw statements.