A corrected version of the above example is therefore:
Note the calls to fz_var. These warn the compiler that it should take care not to lose updates to w or r if an exception is thrown in the fz_try. See Rule 5 in ExceptionRules ExceptionRules below.