Description:
Currently, error messages in the get_execution_order method of PipelineEngine (src/jpipe_runner/framework/engine.py) are constructed by concatenating strings. This approach makes it harder to manage, format, and extend error information, especially as the project grows.
Proposed improvement:
- Create a dedicated error object or exception class to represent pipeline validation errors.
- Refactor
get_execution_order to instantiate and use this error object, encapsulating all relevant details (cycle nodes, labels, suggestions, etc.).
- Update logging and error reporting to print or serialize the error object, rather than concatenating strings.