aboutsummaryrefslogtreecommitdiff
path: root/.venv/lib/python3.12/site-packages/pythonjsonlogger/exception.py
diff options
context:
space:
mode:
Diffstat (limited to '.venv/lib/python3.12/site-packages/pythonjsonlogger/exception.py')
-rw-r--r--.venv/lib/python3.12/site-packages/pythonjsonlogger/exception.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/pythonjsonlogger/exception.py b/.venv/lib/python3.12/site-packages/pythonjsonlogger/exception.py
new file mode 100644
index 00000000..1233f1ab
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/pythonjsonlogger/exception.py
@@ -0,0 +1,27 @@
+### IMPORTS
+### ============================================================================
+## Future
+from __future__ import annotations
+
+## Standard Library
+
+## Installed
+
+## Application
+
+
+### CLASSES
+### ============================================================================
+class PythonJsonLoggerError(Exception):
+ "Generic base clas for all Python JSON Logger exceptions"
+
+
+class MissingPackageError(ImportError, PythonJsonLoggerError):
+ "A required package is missing"
+
+ def __init__(self, name: str, extras_name: str | None = None) -> None:
+ msg = f"The {name!r} package is required but could not be found."
+ if extras_name is not None:
+ msg += f" It can be installed using 'python-json-logger[{extras_name}]'."
+ super().__init__(msg)
+ return