How can I set up the default CiviCRM error page/message inside the site template?
you can override (not recommended):

templates/CRM/common/fatal.tpl

or set your custom error template here: 

http://d46.demo.civicrm.org/civicrm/admin/setting/debug?reset=1



You can also specify a different error handler in that setting