Skip to content
Tracon

DefaultRunErrorClassifier

Namespace Tracon · Assembly Tracon.Core.dll

Tracon’s built-in error classifier.

public sealed class DefaultRunErrorClassifier : IRunErrorClassifier

objectDefaultRunErrorClassifier

IRunErrorClassifier

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

First tries an exact match on the error’s stable identity (RunError.Type); this maps both the value written by TraconException subtypes (for example: content_filtered) and the old fully-qualified type name written before that value was added (for example: Tracon.TraconCompilationException) to the SAME class — past records join the new taxonomy without breaking.

If there is no exact match, it falls back to pattern matching on the message and the type name. An error that matches no rule becomes RunErrorClass.Unknown — it is never guessed.

Called only on the error path (see IRunErrorClassifier); the patterns are written with the source generator (GeneratedRegex) so as not to allocate on the hot path.

Public, and safe to construct directly: it carries no dependencies, so a consumer’s own IRunErrorClassifier can compose it — try an SDK-specific rule first, then fall back to builtIn.Classify(runError) — without going through DI.

Creates a new instance of Tracon’s built-in error classifier.

public DefaultRunErrorClassifier()

Classifies the error. Returns RunErrorClass.Unknown if no rule matches — it does not guess.

public RunErrorClassification Classify(RunError runError)

runError RunError

The raw error to classify.

RunErrorClassification

The class and clustering fingerprint.