Mark Hamill, in an interview with Popcorn with Peter Travers, explained how he pitched an idea to J.J. Abrams about Han Solo's death. When he read the script, Hamill was disappointed that he, Ford, and Fischer did not have an onscreen reunion. Hamill didn't recommend having Han Solo survive the film, but he did have an alternative approach to Solo's death:
"Instead of Finn and Rey coming and almost saving Han, what if it's Leia and I? She's about to be abducted by two costume guards, one guard turns to the other guard, shoots the guard, takes off his helmet and it's me! That I did get her message. I said, No. 1, it's a hell of an entrance, No. 2, it's misdirection ... We're [also] back on a Death Star, very similar! We rush to his aid, we don't alter what you want to do, but if we witness Han dying, that has so much emotional resonance that will carry into the next film."
As Hamill then points out, the idea wasn't accepted, of course...