Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
newm4n authored Aug 16, 2023
2 parents 50bb2d6 + d368b53 commit 35576b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ast/RuleEntry.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,15 @@ func (e *RuleEntry) SetGrlText(grlText string) {
}

// Evaluate will evaluate this AST graph for when scope evaluation
func (e *RuleEntry) Evaluate(ctx context.Context, dataContext IDataContext, memory *WorkingMemory) (bool, error) {
func (e *RuleEntry) Evaluate(ctx context.Context, dataContext IDataContext, memory *WorkingMemory) (can bool, err error) {
if ctx.Err() != nil {
return false, ctx.Err()
}
defer func() {
if r := recover(); r != nil {
err = fmt.Errorf("Error while evaluating rule %s, panic recovered", e.RuleName)
}
}()
if e.Retracted {
return false, nil
}
Expand Down

0 comments on commit 35576b4

Please sign in to comment.