r12947: added some error checking that I stumbled across while testing domain migration