Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pulpcore/exceptions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
HttpResponseError,
SslConnectionError,
RemoteConnectionError,
FeatureNotImplementedError,
)
from .validation import (
ContentOverwriteError,
Expand Down
15 changes: 15 additions & 0 deletions pulpcore/exceptions/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,3 +430,18 @@ def __str__(self):
return f"[{self.error_code}] " + _("Connection failed for {url}: {details}").format(
url=self.url, details=self.details
)


class FeatureNotImplementedError(PulpException):
"""
Raised when a requested feature is not yet implemented.
"""

error_code = "PLP0028"

def __init__(self, message):
super().__init__()
self.message = message

def __str__(self):
return f"[{self.error_code}] {self.message}"
2 changes: 2 additions & 0 deletions pulpcore/plugin/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
ContentOverwriteError,
DigestValidationError,
ExternalServiceError,
FeatureNotImplementedError,
HttpResponseError,
InvalidSignatureError,
MissingDigestValidationError,
Expand All @@ -22,6 +23,7 @@
"ContentOverwriteError",
"ValidationError",
"DigestValidationError",
"FeatureNotImplementedError",
"InvalidSignatureError",
"PulpException",
"SizeValidationError",
Expand Down
Loading