loose coupling & module loading

18 views
Skip to first unread message

Ken Carpenter

unread,
Nov 2, 2015, 8:32:32 AM11/2/15
to Kernel.js
Currently if there is an error (js runtime) while loading a module, the whole thing halts and does not continue loading other modules.
Since the design is supposed to be loose coupling, I was wondering if it is possible to continue loading other modules even in the case that one module contains JS runtime errors?


alan lindsay

unread,
Nov 2, 2015, 11:16:46 AM11/2/15
to Kernel.js
That is an interesting thought. I had previously considered this from a purely present/not present situation but there is something to be said for continuing on failed modules. The main concern here is error notification and resolution and striking a balance between which errors must be fixed and which can fail gracefully. It does make sense to limit failure to the module itself rather than the entire program. I'll take a look at this, can you open a github issue for it?

Alan 

On Mon, Nov 2, 2015 at 6:32 AM Ken Carpenter <k.carpen...@gmail.com> wrote:
Currently if there is an error (js runtime) while loading a module, the whole thing halts and does not continue loading other modules.
Since the design is supposed to be loose coupling, I was wondering if it is possible to continue loading other modules even in the case that one module contains JS runtime errors?


--
You received this message because you are subscribed to the Google Groups "Kernel.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kerneljs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ken Carpenter

unread,
Nov 4, 2015, 11:05:37 PM11/4/15
to Kernel.js
Done :)

https://github.com/alindsay55661/Kernel.js/issues/9

Great work on the framework so far, it's working great so far. Thank you.

Ken Carpenter

unread,
Dec 4, 2015, 6:05:58 AM12/4/15
to Kernel.js
FYI
https://www.youtube.com/watch?v=b5pFv9NB9fs around the 41minute mark, Nick talks about wrapping each module object in a try/catch and displaying the errors for development environment and suppressing on production environment. Thought you might be interested if you have not seen it already.

Ken


On Tuesday, November 3, 2015 at 3:16:46 AM UTC+11, alindsay55661 wrote:

alan lindsay

unread,
Dec 4, 2015, 10:48:33 AM12/4/15
to Kernel.js
Thanks for the tip, I have been overriding decorateMethod() for this and only catching at the function level. But catching it during module registration or instantiation is a more helpful paradigm.
Reply all
Reply to author
Forward
0 new messages