Skip to content

Commit b294923

Browse files
committed
add error log for unsupported charset
1 parent 5a520d5 commit b294923

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

modules/charset/charset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func ToUTF8(content []byte, opts ConvertOpts) []byte {
7474

7575
encoding, _ := charset.Lookup(charsetLabel)
7676
if encoding == nil {
77-
setting.PanicInDevOrTesting("unknown detected charset %q, it shouldn't happen", charsetLabel)
77+
setting.PanicInDevOrTesting("unsupported detected charset %q, it shouldn't happen", charsetLabel)
7878
return content
7979
}
8080

modules/setting/setting.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,4 +240,5 @@ func PanicInDevOrTesting(msg string, a ...any) {
240240
if !IsProd || IsInTesting {
241241
panic(fmt.Sprintf(msg, a...))
242242
}
243+
log.Error(msg, a...)
243244
}

0 commit comments

Comments
 (0)