summaryrefslogtreecommitdiff
path: root/reencode.go
diff options
context:
space:
mode:
Diffstat (limited to 'reencode.go')
-rw-r--r--reencode.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/reencode.go b/reencode.go
index 232d91d..e48c58c 100644
--- a/reencode.go
+++ b/reencode.go
@@ -519,7 +519,7 @@ func (enc *ReEncoder) handleRuneMain(c rune, t jsonparse.RuneType) error {
case 't':
err = enc.emit(writeStringChar(enc.out, '\t', BackslashEscapeShort, enc.BackslashEscape))
default:
- panic("should not happen")
+ panic(fmt.Errorf("should not happen: rune %q is not a RuneTypeStringEsc1", c))
}
case jsonparse.RuneTypeStringEscUA:
enc.uhex[0], _ = jsonparse.HexToInt(c)