Add option that allows exceptions to be raised from middleware

Direct responses may not be desirable in cases of larger applications that
need more fine-grain control. Add an option that allows exceptions to be
raised so that they can be caught and responded to further up the middleware
stack.