Log the exception loading the module script on the console.

This commit is contained in:
Ashesh Vashi
2016-02-28 17:05:48 +05:30
parent f8a45799b6
commit 3051e7cd62

View File

@@ -550,12 +550,16 @@ function(require, $, _, S, Bootstrap, pgAdmin, alertify, CodeMirror) {
if (m.init && typeof(m.init) == 'function')
m.init();
} catch (e) {
// Log this exception on console to understand the issue properly.
console.log(e);
obj.report_error(
'{{ _('Error loading script - ') }}' + path);
}
if (c)
c.loaded += 1;
}, function() {
// Log the arguments on console to understand the issue properly.
console.log(arguments);
obj.report_error(
'{{ _('Error loading script - ') }}' + path);
});