@vdhewei/xlsx-template-lib 1.3.1 → 1.3.2

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.
package/dist/index.mjs CHANGED
@@ -3435,21 +3435,26 @@ var compileRowCells = function(ctx, expr, cellPoints, rowIndex, errs) {
3435
3435
  return;
3436
3436
  }
3437
3437
  ctx.currentExpr = expr;
3438
- cellPoints.forEach((cellPoint, index) => {
3439
- const r = cellPoint.Row;
3440
- const sheet = ctx.sheet;
3441
- const c = cellPoint.Column;
3442
- const cell = sheet.findCell(r, c);
3443
- if (cell === void 0 || cell.value !== void 0 && cell.value !== null && cell.value !== "") {
3444
- return;
3445
- }
3446
- let templateValue = String(expr.value);
3447
- const macroTokens2 = getMacroTokens(expr);
3448
- templateValue = resolveFunctionExpr(ctx, templateValue, expr);
3449
- templateValue = resolveCompileMacroExpr(ctx, templateValue, macroTokens2, index, cellPoints.length);
3450
- templateValue = resolveAliasExpr(ctx, templateValue, index);
3451
- cell.value = resolveValueExpr(ctx, templateValue);
3452
- });
3438
+ try {
3439
+ cellPoints.forEach((cellPoint, index) => {
3440
+ const r = cellPoint.Row;
3441
+ const sheet = ctx.sheet;
3442
+ const c = cellPoint.Column;
3443
+ const cell = sheet.findCell(r, c);
3444
+ if (cell === void 0 || cell.value !== void 0 && cell.value !== null && cell.value !== "") {
3445
+ return;
3446
+ }
3447
+ let templateValue = String(expr.value);
3448
+ const macroTokens2 = getMacroTokens(expr);
3449
+ templateValue = resolveFunctionExpr(ctx, templateValue, expr);
3450
+ templateValue = resolveCompileMacroExpr(ctx, templateValue, macroTokens2, index, cellPoints.length);
3451
+ templateValue = resolveAliasExpr(ctx, templateValue, index);
3452
+ cell.value = resolveValueExpr(ctx, templateValue);
3453
+ });
3454
+ } catch (err) {
3455
+ const msg = err.message;
3456
+ throw new Error(`expr:${expr.express}, resolve error: ${msg}`);
3457
+ }
3453
3458
  };
3454
3459
  var generateWorkSheetCellsPlaceholder = function(ctx, expr, sheet) {
3455
3460
  const errs = [];