Howto set up a custom error page for SharePoint 2010

A detailed guide can be found here: http://www.tcscblog.com/2012/02/10/custom-error-page-with-log-support-ticket-link-for-sharepoint-2010/. Be aware that they have mistypped the SharePoint cmd, instead use: Set-SPCustomLayoutsPage -Identity Error -RelativePath “/_layouts/CustomError/error.aspx” -WebApplication <webappURL>

Read more