 <p><pre>#{JSON.stringify data, null, '  '}</pre></p>"
       res.end (plates.bind plate.toString(), data, map)
 
+
 # The defaults for `error-page` module options.
-errorOptions =
+heckOptions =
   debug: if process.env.NODE_ENV is 'development' then true else false
   "*": errorTemplate
+
+
+# Use this middleware before any errors happen, to override `heckOptions`.
+module.exports.connect = (opts) ->
+  (req, res, next) ->
+    res.heckOptions = opts
+    next()
+
 
 # Pass to `vfs-http-handler` or call directly.
 module.exports.handler = (req, res, err, code) ->

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


module.exports.connect = (opts) ->
  (req, res, next) ->
    req.errorHandlerOptions = opts
    next()


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

  # The configurable error-page options.
  opts = merge heckOptions, res.heckOptions ? {}

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