Skip to content

fix(history): add error logging to silent catch {} handlers in tri_history.zig #167

Description

@gHashTag

Task

In src/tri/tri_history.zig, multiple functions silently swallow errors with empty catch {} handlers. This hides persistence failures.

Find ALL instances of catch {} in this file and add error logging.

Fix Pattern

Replace:

self.history.load() catch {};

With:

self.history.load() catch |err| {
    std.log.debug("history load: {s}", .{@errorName(err)});
};

Use std.log.debug (not std.debug.print) for consistency.

File

  • src/tri/tri_history.zig — all catch {} instances

Acceptance

  • zig build compiles without errors
  • zig fmt passes
  • No empty catch {} handlers remaining in this file
  • Each catch logs the error name via std.log.debug

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:spawnAuto-spawn agent container

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions