prevent leak of class name from retrieve_hook() on an exception