Report every invariant break through internalError

This commit is contained in:
2026-09-29 01:38:45 +02:00
committed by Lillem4n
parent 3aa747de02
commit 514d738b08
13 changed files with 25 additions and 27 deletions
+2 -2
View File
@@ -176,7 +176,7 @@ func (p *valueProof) proveTemplate(t *template) proven {
func (p *valueProof) proveCalc(t *template, body string, args []string) proven {
expr, err := parseCalc(args[0])
if err != nil {
panic(fmt.Sprintf("fejkdata: calc(%q) reached a proof unparsed: %v", args[0], err))
panic(internalError("calc(%q) reached a proof unparsed: %v", args[0], err))
}
v, doubt := p.proveExpr(expr, t.fields)
if doubt == "" && !(magnitude(v) <= calcLimit) {
@@ -219,7 +219,7 @@ func (p *valueProof) proveExpr(n calcNode, fields map[string]node) (proven, stri
}
return combine(n, l, r)
}
panic(fmt.Sprintf("fejkdata: calc node %T has no bound", n))
panic(internalError("calc node %T has no bound", n))
}
// combine bounds one operation from the bounds of its sides.