(CNN) Democratic presidential candidate and businessman Andrew Yang became visibly emotional when discussing gun violence prevention with a woman who said she lost her daughter to a stray bullet.

The exchange came less than a week after a masked gunman in Dayton, Ohio, killed nine and injured 27 early Sunday morning. Last weekend also saw a shooting in El Paso, Texas, that left 22 dead and more than two dozen wounded.

During the Everytown Gun Safety Town Hall in Des Moines, Iowa, on Saturday, Yang was asked a question by a woman named Stephanie about preventing unintentional shootings by children.

Stephanie, who is from Las Vegas, said she lost her 4-year-old daughter Dayla when she was struck and killed by a stray bullet in March 2011. Her son, Dayla's twin, witnessed it.

"Firearms are the second leading cause of death for children and teenagers in the US, but 4.6 million American children live in homes with at least one gun that is loaded and unlocked, and hundreds of them gain access to a gun and unintentionally shoot themselves or someone else every year," she said to Yang. "As President, how would you address unintentional shootings by children?"

When Stephanie finished her question, Yang asked the moderator if it was OK if he went to give her a hug. As he came back up on stage, Yang said, "I have a six- and three-year-old boy, and I was imagining..." before getting too choked up to continue.

Fighting back tears for several seconds, he added, "I was imagining it was one of them that got shot and the other saw," before breaking down into tears again and telling Stephanie, "I'm so sorry."

Yang continued to fight his tears, and the audience clapped supportively.

Composing himself, Yang explained that "the biggest downside of running for president for me has been that I don't get to see my family very much," and that Stephanie's story really impacted him.

"That scene that she described, I'm sorry, it's like very, very effecting," he said. "You're right that when there's a gun in the household, you're more likely to have a child get shot or the owner get shot than to kill, let's say, an intruder into the house. Those are just numbers, those are just the facts."

Yang pointed to his proposal to personalize guns, such that they could only be used by the authorized owner, as a way to address unintentional shootings by children.

"if we can convince Americans that personalized guns are a good idea then again, if the child gets ahold of the gun then they can't do anything with it, then it just becomes a very heavy, expensive prop," he said.

Referencing that gun owners are parents and have similar concerns, Yang argued that "if you say hey, we'll upgrade your guns for free -- when we can do that, like you can upgrade the guns for free -- that would help make kids safer in our homes."