catch exceptions around html parser