| Home | Libraries | People | FAQ | More

#### test::fail_handler

Return a test CompletionHandler which requires a specific error code.

##### Synopsis

Defined in header `<boost/beast/_experimental/test/handler.hpp>`

    handler
    fail_handler(
        error_code ec);

##### Description

This handler can be invoked with any signature whose first parameter is an `error_code`. The handler fails the test if:

- The handler is destroyed without being invoked.
- The handler is invoked with an error code different from what is specified.

##### Parameters

Name | Description
--- | ---
`ec` | The error code to specify.