To the user:
"Sorry, an error occured. It has been logged and will be looked at"
or something like that. Anything else is too much for end users and doesn't help but rather causes confusion and chaos. Optionally, if you submit the error into an error tracking system, you might also display a reference number / tracking number of sorts - but even that usually doesn't really help.
At most, you might want to single out the "you don't have permissions to view this page" error separately and give another message for those errors - but I wouldn't go too far with that.
What you could present is a textbox allowing the user to describe what he was doing leading up to the error, and submit that to you via e-mail. In our experience, less than 5% of users really make use of that feature, however.
Really, what you need to do is log the error and all its info (message, stack trace etc.) in the background into a database table or something for you to analyze.