From 9d1d4542d875ff23a5882ba7f7c4a0262ac64c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Tue, 26 Sep 2023 11:57:02 +0200 Subject: [PATCH] exception --- CHANGELOG.md | 2 ++ README_SETUP.md | 3 +++ src/linkahead/exceptions.py | 9 +++++++++ 3 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebdfab4b..82b2454c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * `Message.__init__` signature changed and `type` defaults to "Info" now. * `Message.__eq__` changed. Equality is equality of `type`, `code`, and `description` now. +* Rename from CaosDB to LinkAhead. For proper migration, follow the instructions + in `migration_to_linkahead.md` and check the documentation at [docs.indiscale.com](https://docs.indiscale.com/caosdb-pylib/README_SETUP.html#migration). ### Deprecated ### diff --git a/README_SETUP.md b/README_SETUP.md index 01eea851..b05eff87 100644 --- a/README_SETUP.md +++ b/README_SETUP.md @@ -128,3 +128,6 @@ Build documentation in `build/` with `make doc`. ### Troubleshooting ### If the client is to be executed directly from the `/src` folder, an initial `.\setup.py install --user` must be called. + +## Migration ## +TODO diff --git a/src/linkahead/exceptions.py b/src/linkahead/exceptions.py index a4bb5ac4..9c9ca9a3 100644 --- a/src/linkahead/exceptions.py +++ b/src/linkahead/exceptions.py @@ -28,6 +28,8 @@ HTTP response codes) and for transaction errors (i.e. missing permissions, dependencies, non-passing consistency checks etc.). """ +from warnings import warn + from lxml import etree @@ -39,6 +41,13 @@ class LinkAheadException(Exception): self.msg = msg +class CaosDBException(LinkAheadException): + def __init__(self, *args, **kwargs): + warn(("The name CaosDBException is deprecated. Please use LinkAheadException."), + DeprecationWarning) + super().__init__(*args, **kwargs) + + class ConfigurationError(LinkAheadException): """ConfigurationError. -- GitLab