weavejester / integrant

Micro-framework for data-driven architecture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exception handling during build

dsteurer opened this issue · comments

Currently, when an exception is thrown during build, there is no way to access the partially built system.
It would be useful to have access to it for example in order to halt the keys that have already been built before the exception was thrown.
Could we add an exception handler argument to the build function or have it rethrow the exception with the partially built system attached. (I think component is doing the latter.)

Sure, that's a good idea. I think I'm partial to wrapping the exception. Something like try-action in Component would be ideal. I'll try and find some time tomorrow to resolve this, but you're welcome to open a PR yourself if you fix it before me.