title: Catching module loading errors and processing them
body: <p>I am trying to load some content using require.js. If the content doesn't exist I'd like to catch the error and notify the user.</p>
  
  <p>In firebug I can see two errors:</p>
  
  <blockquote>
    <p>"NetworkError: 404 Not Found </p>
  </blockquote>
  
  <p>...and then a few seconds later:</p>
  
  <pre><code>var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#
  Load timeout for modules: modules/messages/messages 
  http://requirejs.org/docs/errors.html#timeout
  </code></pre>
  
  <p>My code resembles:</p>
  
  <pre><code>require([path], function(content){
    //need to catch errors as this will not be called;
  });
  </code></pre>
  
  <p>How would one bind to requirejs events? Any idea?</p>