Hygiene: Throw JS exception on bad template file rather than PHP exception.

Bug: 56076

Change-Id: I69fd96b8c58ee8c0913f7a24d6174bcfc33ba574
Merge "Hygiene: Throw JS exception on bad template file rather than PHP exception."