Main problem is that you don't know that. And all what you can do is check all your code. Maybe you can add some stats method to call when something go wrong.
There is a method:
String getState(String name)
But if you has to many modules you just don't want to check them all.
I see solution in some dependency graph with states.
Minor example:
modules.define(
'A',
function(provide, prev) {
var a = {};
// do not call provide
//provide(a);
});
modules.require(
['A'],
function(a) {
/* never goes here */
});
Main problem is that you don't know that. And all what you can do is check all your code. Maybe you can add some stats method to call when something go wrong. There is a method:
But if you has to many modules you just don't want to check them all. I see solution in some dependency graph with states. Minor example: