When an error can not be presented on the current page, a separate page is used just to display the message. The error page should ideally contain a good description of what the nature of the problem is and how the user may avoid or rectify the problem.
Error page 500
Error page 404
If the error is a 404 (page not found) the page may include some nice options of where to go. Common items may include the index/home-page, search or other sites.
Pattern: System alerts