MDL-59431 requirejs: Prioritise errors
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 12 Jul 2017 02:05:59 +0000 (10:05 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 12 Jul 2017 02:05:59 +0000 (10:05 +0800)
lib/requirejs.php

index a01d2e3..f6140a4 100644 (file)
@@ -100,7 +100,9 @@ if ($rev > 0 and $rev < (time() + 60 * 60)) {
             $js = file_get_contents($jsfile);
             if ($js === false) {
                 error_log('Failed to load JavaScript file ' . $jsfile);
-                $js = '/* Failed to load JavaScript file ' . $jsfile . '. */';
+                $js = "/* Failed to load JavaScript file {$jsfile}. */\n";
+                $content = $js . $content;
+                continue;
             }
             $js .= "\n";
             // Inject the module name into the define.