I've been robbed a couple of times during my travels... it happens. The most scary incident was probably in Managua, the capital of Nicaragua.
When I arrived in the afternoon, people were already telling me not to walk around - not even in broad daylight.
In the evening, I wanted to go to a bar and grab a few drinks with some friends, but the hotel receptionist told us to take a taxi - even though the bar was a mere two blocks away!
So of course I wanted to be on the safe side and ended up taking a taxi to the bus station the next day - only to have the taxi driver rob me!
He pulled into a dark alley, threatened me with a knife and told me to give him all my money. Fortunately I managed to convince him that I need my backpack for my work, but it was a pretty scary experience.
Later that day I met an expat who had been in the country for a couple of years already and he said there had been 200 assaults by cab drivers on passengers in the last two weeks alone.
Managua is a scary place... I had a great time in León though.