One would hope that they were in a state of Grace when they died by confessing any known Mortal sins as soon as they were aware of them. That they received Holy Communion as often as possible. That they were anointed at some point during their illness if they suffered from an illness. I would try and lead a person who my be dying through a reflection and examination of conscience and praying the Act of Contrition. This is why it is so important why family members are aware of how to prepare someone for a good and holy death.
DISCLAIMER: Catholic Answers has turned over the archive to Catholic-Questions.org and no longer owns, manages, or moderates the forums. For additional apologetics resources please visit www.catholic.com.