mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
feature(main) mrequire: tryCatchLog - > tryCatch
This commit is contained in:
parent
3260695785
commit
10af73fd49
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue