yandex / mapsapi-modules

Async modular system
132 stars 29 forks source link

Add ability to identify, which of the module generation's dependency is not resolved #13

Open narqo opened 11 years ago

narqo commented 11 years ago

In case

modules.define('a', function(provide) { provide() });
modules.define('a', ['b'], function(provide, b, a) { provide(a) });
modules.define('a', ['c'], function(provide, c) { provide(a) });

so if b is not resolved, the error stack would be:

Uncaught Error: Module "a": can't resolve dependence "b" <file>
  throwModuleNotFound <file>
  calcDeclDeps <file>
  onNextTick <file>
  callFns <file>
  onMessage

It would be cool to have an ability to understand, from what of a's generation error comes