In juli 2011 my passport was stolen at the long distance bus station of Lijiang. We were on our way to Shangri-La but we never got there.
About how this happened and what happened next to be permitted to leave China I wrote a step by step story on my blog. http://bit.ly/poZ0Cv
All in all it took eight days to get an emergency passport and exit visa. In case this will happen to you, you can read here what you can expect.
Ronald