Include database error message in exception