Move exception class definitions from python-hzb-rdm-web into this package
The python-hzb-rdm-web package defines a hierarchy of exception classes with AppError
as common base class. It features a class attribute Status
that will be used to set the HTTP Status Code in the reply. Obviously, the HTTP Status Code is web application specific and that is why the exception class definitions have been put into this package.
But now, it turns out that some of the exceptions need to be thrown in lower level general purpose modules that may be called from web applications, but may also be used in other scripts. Obviously, these lower level modules should not depend on python-hzb-rdm-web
. One option could be to raise more generic exceptions in the lower level modules and then to translate them to AppError
based ones in web applications. But that would be needlessly complicated.
The easier option is to move the exception definitions into this package, as done in this merge request. The Status
is just a class attribute that may simply be ignored and doesn't cause troubles when the exception is raised outside a web application.