We generally throw `DeveloperError` as close to the top of the function as possible.  I usually do it before assignment to any members.