Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/exception_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ end

struct LSInvalidFile <: Exception
msg::AbstractString
uri::URI
end

function Base.showerror(io::IO, ex::LSInvalidFile)
print(io, ex.msg)
print(io, ex.msg, " File: '", uri2filepath(ex.uri), "'")
end
2 changes: 1 addition & 1 deletion src/textdocument.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct TextDocument

function TextDocument(uri::URI, text::AbstractString, version::Int, lid = nothing)
# TODO Remove this check eventually
occursin('\0', text) && throw(LSInvalidFile("Tried to set a text with an embedded NULL as the document content."))
occursin('\0', text) && throw(LSInvalidFile("Tried to set a text with an embedded NULL as the document content.", uri))

line_offsets = _compute_line_offsets(text)
line_indices = _compute_line_indices(text)
Expand Down