Skip to content

_exceptions.py: Align LoadError() parameter ordering

Description

All of the errors which subclass from BstError have their first positional argument as message, LoadError should follow this ordering for consistency. Unpickling subclassed Exceptions with multiple positional parameters, with any but the first being named 'message' is also problematic with builtin __str__ Exception handling.

This was discussed on https://mail.gnome.org/archives/buildstream-list/2019-July/msg00024.html where it was agreed (along with other things) that the LoadError signature should be brought inline to improve consistency.

Whilst working on the multiprocessing work for #1036 (closed) the unpickling of the subclassed LoadError has provided some pain points, landing this MR first will go someway to handling the issue.

Changes proposed in this merge request:

  • Change ordering of LoadError parameters to match rest of BstErrors
  • Change all instances of it to match the required argument order

Merge request reports

Loading