Error messages: Properly catch and log DB IDO errors.

Refs #6070