Skip to content

Commit a1ca4ee

Browse files
authored
Merge pull request #900 from julia-vscode/hover
don't attach user code to error
2 parents 826ca91 + 4ea6455 commit a1ca4ee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/requests/hover.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function get_hover(b::StaticLint.Binding, documentation::String, server)
4646
end
4747
end
4848
else
49-
try
49+
documentation = try
5050
documentation = if binding_has_preceding_docs(b)
5151
string(documentation, Expr(parentof(b.val).args[3]))
5252
elseif const_binding_has_preceding_docs(b)
@@ -56,8 +56,7 @@ function get_hover(b::StaticLint.Binding, documentation::String, server)
5656
end
5757
documentation = string(documentation, "```julia\n", Expr(b.val), "\n```\n")
5858
catch err
59-
doc1, offset1 = get_file_loc(b.val)
60-
throw(LSHoverError(string("get_hover failed to convert the following to code: ", String(codeunits(get_text(doc1))[offset1 .+ (1:b.val.span)]))))
59+
throw(LSHoverError(string("get_hover failed to convert Expr")))
6160
end
6261
end
6362
elseif b.val isa SymbolServer.SymStore

0 commit comments

Comments
 (0)