## Error handling

During the processing of a request, an error may occur, often by throwing an std::exception. The default `error_handler` class takes care of catching exceptions and turn these in sensible error replies. A default error_handler is created in the `zeep::http::server` constructor and this one uses the default `error.xhtml` template in `docroot`, or a built in template if that file does not exist.

You can derive your own error handler from `error_handler` and implement a `create_error_reply` member to handle some errors differently. The error handlers will be called in the reverse order of being added allowing you to override default behaviour.