libLogit

Error Taxonomy And Unsupported-Field Policy

This page defines how libLogit should fail when configuration, levels, paths, or optional features are wrong.

The goal is not to make every binding throw the exact same exception type. The goal is to make the failure shape predictable across bindings.

Why This Matters

Portable logging gets messy when one binding rejects a bad config clearly and another quietly accepts it. The user then thinks the SDK is portable when the real behavior is just drifting.

Beta needs a consistent answer to two questions:

  1. what kinds of mistakes must fail fast?
  2. what should a binding do with an optional field it does not really support?

High-Level Policy

libLogit should prefer:

The SDK should avoid:

Error Categories

1. Configuration Shape Errors

These happen when the overall structure is wrong.

Examples already present in the repo:

Expected policy:

2. Unknown Or Unsupported Key Errors

These happen when the config contains keys the binding/schema does not recognize.

Examples already present in the repo:

Expected policy:

3. Level Errors

These happen when the level is wrong by value or type.

Examples already present in the repo:

Expected policy:

4. Path And Path-Mode Errors

These happen when path semantics contradict each other.

Examples already present in the repo:

Expected policy:

5. Sink Vocabulary Errors

These happen when a sink name is not part of the binding’s supported contract.

Examples already present in the repo:

Expected policy:

6. Advanced-Feature Validation Errors

These happen when Python-reference advanced fields are malformed.

Examples already present in the repo:

Expected policy:

Unsupported-Field Rules

For optional or advanced fields, a binding should do exactly one of these:

  1. implement the field and test it
  2. reject the field clearly during parse/setup
  3. document the field as a no-op with explicit limits

What a binding should not do:

Current Repo Reality

Portable baseline fields

These are strong enough to teach broadly today:

Python-first advanced fields

These have the strongest direct validation and runtime proof in Python:

Other bindings should currently be treated as baseline implementations unless their docs and tests say otherwise.

Across bindings, the wording does not need to be byte-for-byte identical. But good libLogit errors should usually have these qualities:

Good examples from the current repo:

Relationship To Conformance

Not every exact error string needs cross-binding conformance today. But the failure category should remain stable:

That is enough to make the SDK feel coherent while Beta hardens the full binding matrix.

Where To Look For Evidence