Table Of Contents

Previous topic

9.6. HostResolver

Next topic

9.8. Requests TLS Session

9.7. Base class for exceptions

class safeguard.sessions.plugin.exceptions.PluginSDKExceptionFormatter(message, variables=None)

The PluginSDKExceptionFormatter is the base class for Plugin SDK exceptions.

Parameters
  • message (str) – free text without variables

  • variables (dict) – a dictionary of variables to format in the exception message or None

Not to be used directly, the PluginSDKExceptionFormatter adds formatting of variables provided to an exception.

append_variables(variables)

The append_variables() adds more details to an exception object. Does not overwrite previous details, even if the same key is used.

Parameters

variables (dict) – additional variables

Returns

self

exception safeguard.sessions.plugin.exceptions.PluginSDKRuntimeError(message, variables=None)

The PluginSDKRuntimeError is the base class for Python RuntimeError like exceptions with formatting, it is also a subclass of PluginSDKExceptionFormatter.

exception safeguard.sessions.plugin.exceptions.PluginSDKRuntimeWarning(message, variables=None)

The PluginSDKRuntimeWarning is the base class for Python RuntimeError like exceptions with formatting, it is also a subclass of PluginSDKExceptionFormatter.

exception safeguard.sessions.plugin.exceptions.PluginSDKValueError(message, variables=None)

The PluginSDKValueError is the base class for Python RuntimeError like exceptions with formatting, it is also a subclass of PluginSDKExceptionFormatter.