mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(main) mrequire: add formatMsg
This commit is contained in:
parent
b9a3e4330a
commit
cda210b8d5
1 changed files with 7 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue