He found a serpent in the upper branches of the tree , and again being greatly alarmed , he threw himself into the river , where a crocodile caught him and ate him .