Skip to content

Commit

Permalink
better unwrap message when following cell path in ui.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoine committed Sep 9, 2023
1 parent a0082c9 commit 1d5749b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,13 @@ fn render_data<B: Backend>(frame: &mut Frame<'_, B>, app: &App, config: &Config)
.value
.clone()
.follow_cell_path(&data_path, false)
.expect("unexpected error when following cell path during rendering");
.unwrap_or_else(|_| {
panic!(
"unexpected error when following {:?} in {}",
app.position.members,
app.value.into_string(" ", &nu_protocol::Config::default())
)
});

let normal_name_style = Style::default()
.fg(config.colors.normal.name.foreground)
Expand Down

0 comments on commit 1d5749b

Please sign in to comment.