Be more robust on exceptions.