catching exc_info rather than exception