Si sentiva afflitto per non aver superato l'esame.

He felt troubled for not having passed the exam.