Catch exceptions by reference.