nicopap / cuicui_layout

The dumbest and simplest layouting algorithm for bevy
40 stars 2 forks source link

Proivde a way for users to give span & help messages #90

Open nicopap opened 1 year ago

nicopap commented 1 year ago

Export a

#[derive(Error, Debug)]
struct NiceError {
  help: Option<Box<str>>,
  span_offset: Option<u32>,
  source: anyhow::Error,
}

Now the user can return such an error from their custom argument parser impls, and we can check in the interpreter for them using downcasting, and use their inner offset/help messages in the full message.