# ``twisted`.`protocols`.`haproxy`.`_exceptions``

module documentation
(source)

HAProxy specific exceptions.

Class | `InvalidNetworkProtocol` | The network protocol was not one of TCP4 TCP6 or UNKNOWN.
Class | `InvalidProxyHeader` | The provided PROXY protocol header is invalid.
Class | `MissingAddressData` | The address data is missing or incomplete.
Function | `convertError` | Convert an error into a different error type.

@contextlib.contextmanager
def convertError(sourceType, targetType): (source)
Convert an error into a different error type.

Parameters
sourceType:`BaseException` | The type of exception that should be caught and converted.
targetType:`BaseException` | The type of exception to which the original should be converted.
Returns
`Generator[None, None, None]` | Undocumented