Exception handling: caught handling function to use + uncaught logging