On Tue, 2025-11-25 at 11:20 -0300, Wander Lairson Costa wrote: > On Mon, Nov 24, 2025 at 9:46 PM Crystal Wood <[email protected]> wrote: > > > > On Mon, 2025-11-17 at 15:41 -0300, Wander Lairson Costa wrote: > > > > + > > > + if (timerlat_bpf_restart_tracing()) { > > > + err_msg("Error restarting BPF trace\n"); > > > + return -1; > > > + } > > > > [insert rant about not being able to use exceptions in userspace code in > > the year 2025] > > > > I actually find exceptions an anti-pattern. Modern languages like Zig, > Go and Rust came back to error returning.
Maybe I'm behind the times, but I see exceptions and error returns as complementary... not everything should be an exception and I can certainly see how they could be overused in an anti-pattern way, but they're nice for getting useful information out rather than "something failed" without having to add a bunch of debug prints. -Crystal
