forked from mirror/go-json
Fix error message
This commit is contained in:
parent
48b6fe21c6
commit
04da39a443
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue