When does initiative happen after a failed sleight of hand check?

If someone uses sleight of hand and gets noticed, can they still take their movement or swift action before initiative is rolled? Or is initiative rolled as soon as they fail their check? (assuming the offended party wants to attack the would-be-thief)