http://compresscafe.i2p/blog/applying_the_diagnostics_pattern_in_practice.html
noreturn else void ; } // This is a piece of hackery that allows for fatal and non-fatal errors to be logged easily. `err` can be either {} or an error. pub inline fn diag ( d : * Diagnostics , level : std.log.Level , component : Diagnostic.Component , err : anytype , comptime fmt : [] const u8 , args : anytype , ) DiagRet ( @TypeOf ( err ) ) { const p = d.list.addOne () catch return err;
p.diagFmt ( level, component, if ( @typeInfo ( @TypeOf ( err ) ) == .ErrorSet ) err else error...