Exceptions¶
A list of all Exception specific to pulsar library.
-
exception
pulsar.utils.exceptions.ImproperlyConfigured[source]¶ A
PulsarExceptionraised when an inconsistent configuration has occurred.-
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
PulsarExceptionraised when the protocol encounter unexpected data.It will close the socket connection
-
exception
pulsar.utils.exceptions.HaltServer(reason='Exiting server.', exit_code=3)[source]¶ BaseExceptionraised to stop a running server.When
exit_codeis 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.HttpException(msg='', status=None, handler=None, strict=False, headers=None, content_type=None)[source]¶ The base class of all
HTTPserver exceptionsIntroduces 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
HttpExceptionfor redirects.The
statusis set to302by default.-
location¶ The value in the
Locationheader entry.
-
-
exception
pulsar.utils.exceptions.PermissionDenied(msg='', status=None, handler=None, strict=False, headers=None, content_type=None)[source]¶ An
HttpExceptionwith default403status code.
-
exception
pulsar.utils.exceptions.Http404(msg='', status=None, handler=None, strict=False, headers=None, content_type=None)[source]¶ An
HttpExceptionwith default404status code.
-
exception
pulsar.utils.exceptions.MethodNotAllowed(msg='', status=None, handler=None, strict=False, headers=None, content_type=None)[source]¶ An
HttpExceptionwith default405status code.