@steedos/objectql 2.2.19 → 2.2.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,10 @@
1
+ /*
2
+ * @Author: sunhaolin@hotoa.com
3
+ * @Date: 2021-05-24 12:32:57
4
+ * @LastEditors: sunhaolin@hotoa.com
5
+ * @LastEditTime: 2022-04-17 12:03:58
6
+ * @Description:
7
+ */
1
8
 
2
9
  import { computeFormula } from '../formula';
3
10
  import { SteedosTriggerContextConfig } from "./trigger";
@@ -14,7 +21,7 @@ export async function runValidationRules(method: string, context: SteedosTrigger
14
21
  try {
15
22
  result = await computeFormula(vr.error_condition_formula, objectName, doc, userId, spaceId);
16
23
  } catch (error) {
17
- throw new Error('object_validation_rules_wrong_formula');
24
+ throw new Error(`公式错误,请检查错误条件公式。${error.message.replace(/\:/g, '')}`);
18
25
  }
19
26
  if (result) {
20
27
  throw new Error(vr.error_message);