Catch conversion errors. Constituent of #1105.
Merge pull request #1253 from mojombo/catch-conversion-errors

Catch conversion errors.