Instead of a stack trace, notify the user that there was a concurrent update to the data they were working on, and force them to refresh it before saving. Try to preserve whatever they have edited or your users will hate you.
Or were you looking for a technical solution?