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.
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.