Print problematic path

This commit is contained in:
Dániel Buga 2022-03-25 20:45:40 +01:00
parent 1baaa04158
commit 34d6d29fc2
1 changed files with 4 additions and 1 deletions

View File

@ -430,7 +430,10 @@ pub fn get_uri(&self, buffer: &Buffer) -> Url {
state.opened_documents.contains_key(&buffer.id)
};
if !exits {
let document_uri = Url::from_file_path(&buffer.path).unwrap();
let document_uri =
Url::from_file_path(&buffer.path).unwrap_or_else(|_| {
panic!("Failed to create URL from path {:?}", buffer.path)
});
self.send_did_open(
&buffer.id,
document_uri,