There are a number of good posts out there that will tell you how to get useful, for a developer, error messages out of SharePoint.
- Useful things to know while attempting SharePoint Development
- A solution to “An unexpected error has occurred” in WSS v3
- A tip for your SharePoint development VM
In addition to these great tips also ensure that you edit the web.config in your _layouts directory to disable custom error messages.