func (cc *compileCtx) errorf(p parse.Pos, format string, args ...interface{}) { errutil.Throw(errutil.NewContextualError(cc.name, "static error", cc.text, int(p), format, args...)) }
// errorf stops the ec.eval immediately by panicking with a diagnostic message. // The panic is supposed to be caught by ec.eval. func (ec *evalCtx) errorf(p parse.Pos, format string, args ...interface{}) { errutil.Throw(errutil.NewContextualError( fmt.Sprintf("%s (%s)", ec.name, ec.context), "error", ec.text, int(p), format, args...)) }
// errorf formats the error and terminates processing. func (p *Parser) errorf(pos int, format string, args ...interface{}) { p.Root = nil errutil.Throw(errutil.NewContextualError(p.Name, "parsing error", p.text, pos, format, args...)) }