inmanta / inmanta-core

Inmanta is an automation and orchestration tool
https://inmanta.com
Apache License 2.0
27 stars 7 forks source link

dataflow framework: move error handling to Exception classes #1960

Open sanderr opened 4 years ago

sanderr commented 4 years ago

The handle_exception method in inmanta.compiler contains a lot of branching that could be delegated to the exceptions themselves.

wouterdb commented 4 years ago

I agree that this has to be given a proper place of its own.

I would also be careful not to overload the exceptions themselves. Advanced exception processing (such as explainers and dataflow related stuff), that often works across multiple exceptions, should get a place of its own.

sanderr commented 4 years ago

I'm not sure how to approach this. We could create a submodule in inmanta.compiler but we want to differentiate between exception types in a clean way. Visit the exceptions themselves? But then what's the purpose of the separate module? Have you got something more concrete in mind, or should the first task of this issue be to create an overview of possible designs?