Displaying 404 or 500 with application layout

Greetings all,

I want to display the 500 or 400 error with the application layout in a
.rhtml file like the rest of the site.

How would I go about making this happen??

Blessed Be

Phillip