Is it better to pull out of exams or fail them? This year I have been pursuing my second Master's degree in pure mathematics. It is a one-year program in which the final score is determined 100% by the final exams. I have excellent scores at my previous degrees, but this year I faced a health issue which resulted in me making very little progress, to the point that I'm pretty certain I will fail my upcoming exams. Assuming that I will be able to overcome my health issue and apply for a PhD* in the future:


Would it look better in a PhD application if I pulled out of my upcoming exams completely or if I took them and failed them?
What would I write in my CV in each case?


The second scenario sounds a bit worse to me because there will be a transcript with extremely poor grades which I will have to attach to any future PhD application. But maybe I'm missing something. Any advice is welcome.

*: I haven't decided whether I will be pursuing a PhD or not, so I'm posting the analogous question at workplace.SE as well. I don't think this is cross-posting since the option that is best for pursuing a PhD might not be best for job hunting (for example I'm not sure whether you are supposed to attach your academic transcripts in a job application).
You should go and speak to your course lecturers as soon as possible, and put in a request for special consideration on the basis of illness.  Your university should have a policy of how to apply for special consideration, and the criteria for granting consideration.  This differs from place to place, but most universities are accommodating of problems caused by illness (assuming you can give evidence of this via medical certificates, etc.).  Given your position, I would suggest you request for them to allow you to defer assessment in your courses until you have had time to recover from your illness and study for the exams.  If this is too much for them, then as a fall-back position, ask them to allow you to withdraw from the courses without failure.  Whatever you do, don't just make a unilateral decision on what to do without speaking to your lecturers --- discuss your circumstances with them and find out their position.