Is there a hook that I can use when a fatal error occurs?

Look into the WP_Fatal_Error_Handler class. I see a couple of filters in its display_default_error_template() method that might be helpful for you:

The entire class is a drop-in, so if you need to you can replace it entirely with your own version, but I think one of those filters—probably wp_php_error_args—might be what you’re looking for.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)