ractivejs / ractive-load

Import templates and components using AJAX
ractivejs.github.io/ractive-load
MIT License
55 stars 10 forks source link

Debugging components #21

Open dagnelies opened 10 years ago

dagnelies commented 10 years ago

Hi,

Currently, loading a component is a bit flaky. As soon as there is a tiny error in it, it will fail to display (that's not really a problem, it's faulty) ...The issue is that there isn't even a single log line in order to know what's wrong and locate the error.

Cheers

martypdx commented 10 years ago

EDITED: sorry, just realized what repo this was in.

@dagnelies - yes it can be tricky. Have you tried adding a "catch" then to the load?

Ractive.load().then(function(){
   // do loading stuff
}).then(null, function(err){
    console.error(err)
})