Revision 25d23e41061245932b3f7bee3e14a025adb16005 authored by Jeff Bezanson on 28 July 2017, 21:39:26 UTC, committed by Alex Arslan on 18 September 2017, 23:02:40 UTC
Ref #23012 (cherry picked from commit f1535ab1d70b7d2088a446af6a7adea17ed3e6ed)
1 parent c1cbc98
errors.jl
# This file is a part of Julia. License is MIT: https://julialang.org/license
## Error messages for Unicode / UTF support
const UTF_ERR_SHORT = "invalid UTF-8 sequence starting at index <<1>> (0x<<2>> missing one or more continuation bytes)"
const UTF_ERR_INVALID_INDEX = "invalid character index"
mutable struct UnicodeError <: Exception
errmsg::AbstractString ##< A UTF_ERR_ message
errpos::Int32 ##< Position of invalid character
errchr::UInt32 ##< Invalid character
end
show(io::IO, exc::UnicodeError) = print(io, replace(replace(string("UnicodeError: ",exc.errmsg),
"<<1>>",string(exc.errpos)),"<<2>>",hex(exc.errchr)))
Computing file changes ...