Catch exceptions caused by parsing invalid double values (fixes #706).