Error codes · Declarations and their clauses
PW0339
command_outside_a_handler
The program must hold to this: a command is called only by a page's handler.
The decisions behind it
Reading the diagnostic
pw check prints the code in brackets, [PW0339], with the sentence above and the place in your program. Errors and diagnostics explains how to read one, and every code is listed with its rule.