batmanjs/batman — pull request #896 by nsimmons (2013-11-14 19:19:32+00:00)
Title: If association fetch fails, pass error to callback instead of throw

If an association proxy tries to load the associated model but fails (because it no longer exists for example) an exception is thrown. But the callbacks that are passed in have an error argument so why not pass the error up the call chain and let it be handled if possible?

This is especially important if the association is being loaded during rendering. Because an unhandled exception during rendering causes everything to stop and the page never loads.

Thoughts on this?