feature(main) mrequire: tryCatchLog - > tryCatch

This commit is contained in:
coderaiser 2014-02-04 04:14:25 -05:00
parent 3260695785
commit 10af73fd49

View file

@ -133,12 +133,14 @@
*/
function mrequire(pSrc) {
var lModule, msg,
lError = Util.tryCatchLog(function() {
lError = Util.tryCatch(function() {
lModule = require(pSrc);
});
if (lError)
if (lError && lError.code === 'MODULE_NOT_FOUND')
msg = CloudFunc.formatMsg('require', pSrc, 'no');
else
Util.log(lError);
Util.log(msg);