From cda210b8d5a7df33bc918c8de19f48debbd137d9 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 21 Oct 2013 11:15:20 +0000 Subject: [PATCH] feature(main) mrequire: add formatMsg --- lib/server/main.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/server/main.js b/lib/server/main.js index b30921cc..442df33a 100644 --- a/lib/server/main.js +++ b/lib/server/main.js @@ -122,13 +122,15 @@ * @param {Strin} pSrc */ function mrequire(pSrc){ - var lModule, - lError = Util.tryCatch(function(){ - lModule = require(pSrc); - }); + var lModule, msg, + lError = Util.tryCatch(function() { + lModule = require(pSrc); + }); if(lError) - Util.log('Module ' + pSrc + ' not connected'); + msg = CloudFunc.formatMsg('require', pSrc, 'error'); + + Util.log(msg); return lModule; }