mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 03:01:16 +00:00
feat: modify the output method of rendering module parsing errors
This commit is contained in:
parent
aa6b9c8f7a
commit
8255b79458
@ -1,6 +1,6 @@
|
||||
/* eslint-disable no-console */
|
||||
/* eslint-disable no-new-func */
|
||||
import Debug from 'debug';
|
||||
import logger from './logger';
|
||||
import { isI18nData, RootSchema, NodeSchema, isJSExpression, JSSlot } from '@alilc/lowcode-types';
|
||||
// moment对象配置
|
||||
import _moment from 'moment';
|
||||
@ -36,8 +36,6 @@ const EXPRESSION_TYPE = {
|
||||
I18N: 'i18n',
|
||||
};
|
||||
|
||||
const debug = Debug('utils:index');
|
||||
|
||||
/**
|
||||
* check if schema passed in is a valid schema
|
||||
* @name isSchema
|
||||
@ -264,7 +262,7 @@ export function parseExpression(str: any, self: any) {
|
||||
const code = `with($scope || {}) { ${tarStr} }`;
|
||||
return new Function('$scope', code)(self);
|
||||
} catch (err) {
|
||||
debug('parseExpression.error', err, str, self);
|
||||
logger.error('parseExpression.error', err, str, self);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user