Jump to >

djblets.conditions.errors

Error classes for conditions.

exception ConditionChoiceConflictError[source]

Bases: djblets.registries.errors.AlreadyRegisteredError

A condition choice conflicts with another registered choice.

exception ConditionChoiceNotFoundError(message, condition_index=None, choice_id=None)[source]

Bases: djblets.registries.errors.ItemLookupError

A condition choice was not found.

__init__(message, condition_index=None, choice_id=None)[source]

Initialize the error.

Parameters:
  • message (unicode) – The error message.
  • condition_index (int, optional) – The index of the condition this error applies to within the condition set.
  • choice_id (unicode, optional) – The ID of the choice that could not be found.
exception ConditionOperatorConflictError[source]

Bases: djblets.registries.errors.AlreadyRegisteredError

A condition operator conflicts with another registered operator.

exception ConditionOperatorNotFoundError(message, condition_index=None, operator_id=None)[source]

Bases: djblets.registries.errors.ItemLookupError

A condition operator was not found.

__init__(message, condition_index=None, operator_id=None)[source]

Initialize the error.

Parameters:
  • message (unicode) – The error message.
  • condition_index (int, optional) – The index of the condition this error applies to within the condition set.
  • choice_id (unicode, optional) – The ID of the operator that could not be found.
exception InvalidConditionModeError[source]

Bases: exceptions.ValueError

The condition mode provided was invalid.

exception InvalidConditionValueError(message, code=None, condition_index=None)[source]

Bases: exceptions.ValueError

The condition value provided was invalid.

__init__(message, code=None, condition_index=None)[source]

Initialize the error.

Parameters:
  • message (unicode) – The error message.
  • code (unicode, optional) – The error code. This will generally correspond to a form validation error code.
  • condition_index (int, optional) – The index of the condition this error applies to within the condition set.