News for hackers. Stuff that matters.
Re:Overview of Rust error handling libraries by swfsql on Friday November 22, 2019 @11:43AM (#21607235)

  struct Error {  
    XAtLine47,  
    XAtLine88,  
    YAtLine13,  
  }
This way you have error AND error place as contextualization.
Re:Overview of Rust error handling libraries by shepmaster on Friday November 22, 2019 @01:49PM (#21608655)
Like the sibling, I'm not sure if you are serious, but my library SNAFU (https://docs.rs/snafu/0.6.0/snafu/) is similar to this at a step or two higher level. The idea is that you wrap lower-level errors (a file system error) with a higher-level context (opening the config file).

Taken to the extreme, you have a unique context for every possible error source inside your library, which means you could directly search for the name to find the line number.

This does make me wonder how I could add line / file information to an error automatically though.

Re:Overview of Rust error handling libraries by NieDzejkob on Friday November 22, 2019 @12:04PM (#21607470)
To be honest, I can't tell if you're being serious.