Error controller to handle HTTP errors.

Fixes #257 and #310.
Why `private` visibility? I can imagine a controller wanting to override debugging behavior. `protected` is appropriate.