At least he meant to die trying, if he failed.
If he were to fail, he would have died trying.