Source code for concurrency.exceptions

from django.core.exceptions import SuspiciousOperation, ValidationError
from django.db import DatabaseError
from django.utils.translation import gettext as _


[docs] class VersionChangedError(ValidationError): pass
[docs] class RecordModifiedError(DatabaseError): def __init__(self, *args, **kwargs) -> None: self.target = kwargs.pop("target") super().__init__(*args, **kwargs)
[docs] class VersionError(SuspiciousOperation): def __init__(self, message=None, code=None, params=None, *args, **kwargs) -> None: self.message = message or _("Version number is missing or has been tampered with")