Add better exception description to factories

Add more info for exceptions raised by cli factories when creating an object.