Add an extension hook for error reporting.