Fix the build - catch exceptions by reference