Checkout the ACS AEM Commons Error Page Handler [1] .. its a robust mechanism that allows for Authors (or site owners) to define authorable Error pages in AEM 5 with just "normal" CQ pages.
You can also checkout the source code on the GitHub Project to see how its built out and/or get inspired on how to roll your own (if you dont want to the use the Commons variant for whatever reason).