mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 19:25:48 +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-console */
|
||||||
/* eslint-disable no-new-func */
|
/* eslint-disable no-new-func */
|
||||||
import Debug from 'debug';
|
import logger from './logger';
|
||||||
import { isI18nData, RootSchema, NodeSchema, isJSExpression, JSSlot } from '@alilc/lowcode-types';
|
import { isI18nData, RootSchema, NodeSchema, isJSExpression, JSSlot } from '@alilc/lowcode-types';
|
||||||
// moment对象配置
|
// moment对象配置
|
||||||
import _moment from 'moment';
|
import _moment from 'moment';
|
||||||
@ -36,8 +36,6 @@ const EXPRESSION_TYPE = {
|
|||||||
I18N: 'i18n',
|
I18N: 'i18n',
|
||||||
};
|
};
|
||||||
|
|
||||||
const debug = Debug('utils:index');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* check if schema passed in is a valid schema
|
* check if schema passed in is a valid schema
|
||||||
* @name isSchema
|
* @name isSchema
|
||||||
@ -264,7 +262,7 @@ export function parseExpression(str: any, self: any) {
|
|||||||
const code = `with($scope || {}) { ${tarStr} }`;
|
const code = `with($scope || {}) { ${tarStr} }`;
|
||||||
return new Function('$scope', code)(self);
|
return new Function('$scope', code)(self);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
debug('parseExpression.error', err, str, self);
|
logger.error('parseExpression.error', err, str, self);
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user