Minimal Viable Zig Error Contexts

1 Like

Ha! so we are just linking 30+ page nerd snipe papers in our otherwise enticingly short blogs now :slight_smile:

In true “reserve first” fashion, I find myself pushing all my resource acquisition as early as possible in my program’s lifetime, which sometimes has secondary effect of easier error reporting:

  1. have list of files to process from user
  2. open all the files (building up array list of fd) (early-exit on failure with error reporting)
  3. process all the files

Which also has secondary effect of enabling batched error reporting too (cannot open multiple files).

Maybe its more complicated :person_shrugging:, but what I can tell you is that I am too lazy and will never use diagnostics pattern

1 Like