Catch exception by ref, re #8990