xapi-project / sm

Xapi Project storage managers
GNU Lesser General Public License v2.1
21 stars 91 forks source link

CP-49689: remove reverse dependency on SR from xs_errors #690

Closed MarkSymsCtx closed 5 months ago

MarkSymsCtx commented 5 months ago

xs_errors is one of the lowest level modules in the SM codebase yet it imports the SR module, in order to access the SROSError class, which is one of the highest level modules. The SR subclasses then import the xs_errors module.

Correct this inverted dependency chain by moving the declaration of the error class into xs_errors and fix up the usage.

Also load the XML error message declarations from a sibling file to simplify the unit tests and remove a hard coded path, which might in the future change.