#899: Replace dpm's with proper error handling.