No... It's more like, "he studied all night, [in fear of] failing the exam."