From 04da39a443d87164a2b094e1162600cdd672e08d Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Mon, 1 Feb 2021 12:01:56 +0900 Subject: [PATCH] Fix error message --- encode_vm.go | 2 +- encode_vm_escaped.go | 2 +- encode_vm_escaped_indent.go | 2 +- encode_vm_indent.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/encode_vm.go b/encode_vm.go index 8690f07..f84e812 100644 --- a/encode_vm.go +++ b/encode_vm.go @@ -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 diff --git a/encode_vm_escaped.go b/encode_vm_escaped.go index 2d3e51a..7bc194f 100644 --- a/encode_vm_escaped.go +++ b/encode_vm_escaped.go @@ -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 diff --git a/encode_vm_escaped_indent.go b/encode_vm_escaped_indent.go index 26b2b22..c8804a1 100644 --- a/encode_vm_escaped_indent.go +++ b/encode_vm_escaped_indent.go @@ -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 diff --git a/encode_vm_indent.go b/encode_vm_indent.go index ff5c8d2..587e328 100644 --- a/encode_vm_indent.go +++ b/encode_vm_indent.go @@ -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