 plates = require 'plates'
 util = require 'util'
 errs = require 'errs'
+
 
 # An `error-page` handler, because `templar` wasn't working.
 errorTemplate = (req, res, data) ->

  err = errs.create err unless util.isError err
  console.error err.stack || err

  # The error-page options can be overridden.
  opts = merge errorOptions, req.errorHandlerOptions ? {}

  # The status code and error message.
  message = err.stack.message || err.message || err

  res.error = new ErrorPage req, res, opts
  res.error status, message

