From 10af73fd4932f1fa6d8f3c8f833832510195bafe Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2014 04:14:25 -0500 Subject: [PATCH] feature(main) mrequire: tryCatchLog - > tryCatch --- lib/server/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/server/main.js b/lib/server/main.js index c9bc2811..ee802cf1 100644 --- a/lib/server/main.js +++ b/lib/server/main.js @@ -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);