Better exceptions in setProperty()