keep original error message when wrapping in DatabaseError

fixes #2521
Merge pull request #2552 from defunctzombie/fix_error_message

keep original error message when wrapping in DatabaseError