From the beginning: A hiker embarks up the Yosemite Falls trail on an apparently routine hike. He does not have a detailed plan but intends to work his way above the Valley toward North Dome and eventually return to the Valley floor by way of the Snow Creek trail.
So far so good, until our hiker runs out of water and thirst sets in around the Basket Dome area. From the trail, he sees the Merced River coursing through the Valley below. Lack of water, thirst, high temperatures, and a view of the cool water below induces a revised plan: abandon the established trail and begin a descent straight to the Valley. The descent, though not technical at first, is often difficult, enough so that it is necessary to slide in places (a big clue that reversing course is becoming impossible).
An on-going error during the descent is neglecting to ever look back to see where he is coming from when returning to the trail might still be an option. Eventually, the hiker arrives at a cliff that is not possible to descend. Lateral movement to his right and left are not negotiable and the route he just invented is so steep that going back up is impossible.
In short, our hiker is now alone, thirsty, without water, and hopelessly ledged-out with nightfall approaching.
Eventually, other visitors hear cries for help; at 7:30 that night, Yosemite Emergency Communications Center receives a 911 call and dispatches a YOSAR technical team. Due to terrain difficulty, YOSAR is not able to reach the hiker until the following day. YOSAR successfully completed a high-angle rescue later on Tuesday afternoon.
First: have a solid plan and stick with it. An essential part of route planning involves assessing water and nutrition requirements for the distance and possible conditions on your planned route. This leads to the second lesson learned, which is to carry more than enough water to complete your hike. Finally—and this theme recurs again and again with Yosemite SARs: stay on the established trail. Although continuing with the original route without water risked further dehydration, water would have been reached sooner than awaiting rescuers the next day and perhaps our hiker would have encountered a kind person on the trail willing to spare a little water.
Once our hiker realized his predicament, he remained in place and awaited rescue. While this solution may seem obvious, there have been other desperate ledged-out hikers in this park who suffered fatal falls by trying to force an impossible solution.
In short, make a plan, prepare for proper completion of your plan, stick with your plan, and stay on the trail.