It is an illegal forward pass. When all else fails, read the rule and case book. 7.5.2 SITUATION B:
Quarterback A1 is in position for a direct hand-to-hand snap.
(a) A1 muffs the snap, but is able to take the ball from the ground and spike it forward; or
(b) A1 receives the snap, but his spike attempt hits snapper A2's leg and ricochets into the air.
A1 catches the ball and immediately spikes it forward.
RULING: An illegal forward pass in both (a) and (b). Once the ball touches the ground, a player or a spike attempt is unsuccessful, it may not be grounded legally thereafter using this exception. In order to be a "direct snap" and therefore meet the allowance within the exception, the ball must go immediately from the snapper to the person in position to take the hand-to-hand snap without being muffed, fumbled or otherwise mishandled.