Actions
Bug #19570
closed`Exception#full_message` raises an `EncodingError` if the exception contains UTF8 characters after a newline and `Exception#cause` contains UTF8 characters
Description
e = begin
begin
raise "Übersicht"
rescue => e
raise "\n#{e.message}"
end
rescue => e
e
end
e.full_message
will reproduce the error with the exception incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
.
In this case, all of e.message
, e.cause.message
and e.cause.detailed_message
have a UTF-8 encoding, but e.detailed_message
has an ASCII-8BIT encoding. I think the issue is related to this line (possibly caused by the encoding differences between write_warn2
used here and here in the newline case vs write_warn_str
used here in the no-newline case.
Actions
Like0
Like0Like0Like0