Add debug info to invalid offset error
This commit is contained in:
parent
4c007c86bb
commit
9559894312
1 changed files with 3 additions and 2 deletions
|
|
@ -37,8 +37,9 @@ pub(crate) fn offset(
|
|||
.ok_or_else(|| format_err!("Invalid wide col offset"))?
|
||||
}
|
||||
};
|
||||
let text_size =
|
||||
line_index.index.offset(line_col).ok_or_else(|| format_err!("Invalid offset"))?;
|
||||
let text_size = line_index.index.offset(line_col).ok_or_else(|| {
|
||||
format_err!("Invalid offset {line_col:?} (line index length: {:?})", line_index.index.len())
|
||||
})?;
|
||||
Ok(text_size)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue