Fix error message

This commit is contained in:
Masaaki Goshima 2021-02-01 12:01:56 +09:00
parent 48b6fe21c6
commit 04da39a443
4 changed files with 4 additions and 4 deletions

View File

@ -88,7 +88,7 @@ func encodeRun(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet, opt Enco
for {
switch code.op {
default:
return nil, fmt.Errorf("failed to handle opcode. doesn't implement %s", code.op)
return nil, fmt.Errorf("encoder: opcode %s has not been implemented", code.op)
case opPtr:
ptr := load(ctxptr, code.idx)
code = code.next

View File

@ -21,7 +21,7 @@ func encodeRunEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet, o
for {
switch code.op {
default:
return nil, fmt.Errorf("failed to handle opcode. doesn't implement %s", code.op)
return nil, fmt.Errorf("encoder (escaped): opcode %s has not been implemented", code.op)
case opPtr:
ptr := load(ctxptr, code.idx)
code = code.next

View File

@ -20,7 +20,7 @@ func encodeRunEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode
for {
switch code.op {
default:
return nil, fmt.Errorf("failed to handle opcode. doesn't implement %s", code.op)
return nil, fmt.Errorf("encoder (escaped+indent): opcode %s has not been implemented", code.op)
case opPtr:
ptr := load(ctxptr, code.idx)
code = code.next

View File

@ -20,7 +20,7 @@ func encodeRunIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet, op
for {
switch code.op {
default:
return nil, fmt.Errorf("failed to handle opcode. doesn't implement %s", code.op)
return nil, fmt.Errorf("encoder (indent): opcode %s has not been implemented", code.op)
case opPtr:
ptr := load(ctxptr, code.idx)
code = code.next