You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# For now, don't display module name, maybe want it if this changes to StringEncoders
14
-
const modulename =""
15
-
16
13
# specified encodings are not supported
17
14
type InvalidEncodingError <:StringEncodingError
18
-
mod::ByteString
19
-
msg::ByteString
20
-
args
21
-
InvalidEncodingError(from, to) =new(modulename, "Conversion from <<1>> to <<2>> not supported by iconv implementation, check that specified encodings are correct", (from, to))
message(::Type{InvalidEncodingError}) ="Conversion from <<1>> to <<2>> not supported by iconv implementation, check that specified encodings are correct"
23
19
24
20
# Encountered invalid byte sequence
25
21
type InvalidSequenceError <:StringEncodingError
26
-
mod::ByteString
27
-
msg::ByteString
28
-
args
29
-
InvalidSequenceError(seq) =new(modulename, "Byte sequence 0x<<1>> is invalid in source encoding or cannot be represented in target encoding", (seq,))
30
-
end
31
-
32
-
# Input ended with incomplete byte sequence
33
-
type IncompleteSequenceError <:StringEncodingError
34
-
mod::ByteString
35
-
msg::ByteString
36
-
args
37
-
IncompleteSequenceError() =
38
-
new(modulename, "Incomplete byte sequence at end of input", ())
22
+
args::Tuple{ASCIIString}
23
+
InvalidSequenceError(seq) =new((bytes2hex(seq),))
39
24
end
25
+
message(::Type{InvalidSequenceError}) ="Byte sequence 0x<<1>> is invalid in source encoding or cannot be represented in target encoding"
0 commit comments