Convert recoverable fatal errors into exceptions

Protect against total failure in hooks called from core by converting
recoverable fatal errors into exceptions.

Bug: 66797
Change-Id: I85cc1e6fb8be89e9950df6d0cc7af128241902b8
Merge "Convert recoverable fatal errors into exceptions"