Exceptions

A list of all Exception specific to pulsar library.

exception pulsar.utils.exceptions.PulsarException[source]

Base class of all Pulsar exceptions.

exception pulsar.utils.exceptions.ImproperlyConfigured[source]

A PulsarException raised when an inconsistent configuration has occured.

exit_code

the exit code when rising this exception is set to 2. This will cause pulsar to log the error rather than the full stack trace.

exception pulsar.utils.exceptions.ProtocolError[source]

A PulsarException raised when the protocol encounter unexpected data.

It will close the socket connection

exception pulsar.utils.exceptions.InvalidOperation[source]

An invalid operation in pulsar

exception pulsar.utils.exceptions.HaltServer(reason='Exiting server.', exit_code=3)[source]

BaseException raised to stop a running server.

When exit_code is greater than 1, it is considered an expected failure and therefore the full stack trace is not logged.

exception pulsar.utils.exceptions.HttpRequestException(*args, **kwargs)[source]

Base for all HTTP related errors

exception pulsar.utils.exceptions.HttpConnectionError(*args, **kwargs)[source]

A Connection error occurred.

exception pulsar.utils.exceptions.HttpProxyError(*args, **kwargs)[source]

A proxy error occurred.

exception pulsar.utils.exceptions.SSLError(*args, **kwargs)[source]

An SSL error occurred.

exception pulsar.utils.exceptions.HttpException(msg='', status=None, handler=None, strict=False, headers=None, content_type=None)[source]

The base class of all HTTP server exceptions

Introduces the following attributes:

status

The numeric status code for the exception (ex 500 for server error).

Default: 500.

headers

Additional headers to add to the client response.

exception pulsar.utils.exceptions.HttpRedirect(location, status=None, headers=None, **kw)[source]

An HttpException for redirects.

The status is set to 302 by default.

location

The value in the Location header entry.

exception pulsar.utils.exceptions.PermissionDenied(msg='', status=None, handler=None, strict=False, headers=None, content_type=None)[source]

An HttpException with default 403 status code.

exception pulsar.utils.exceptions.Http404(msg='', status=None, handler=None, strict=False, headers=None, content_type=None)[source]

An HttpException with default 404 status code.

exception pulsar.utils.exceptions.MethodNotAllowed(msg='', status=None, handler=None, strict=False, headers=None, content_type=None)[source]

An HttpException with default 405 status code.