Catch any exception in the proxying loop