hooks should be caught by top-level code not onerror