Resurrecting the discussion old issue here: how should Gazebo treat a link of mass 0? Crashing on exception is suboptimal.
We could allow for links with zero or negative mass and simply warn the user that this will result in very unrealistic physics behavior. I've made a branch test_zero_mass that gets rid of this exception and sets the "invalid" mass with a warning. If we decide we want to allow nonpositive mass-links, this branch could become a pull request.
However, if we want to restrict the user to only positive mass objects, we need to prevent the model from being spawned.