I came across a very useful config tweak the other day for the unhelpful "An unexpected error has occurred" page which I have seen many times in Sharepoint, usually without any related entries in the Sharepoint logs.
If you locate the following in your web.config file:
<SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
And change it to:
<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
You will get a standard and slightly more helpful ASP.NET error page - don't forget to turn off customErrors:
<customErrors mode="Off" />