Error Taxonomy Map (v1.54.0)
Both REslava.Result.Flow and REslava.ResultFlow now emit a _ErrorTaxonomy constant alongside the pipeline diagram constants. It is a markdown table of every detectable error type per method, generated at compile time β no runtime cost, no extra tooling.
Activation β automatic for any class that has at least one [ResultFlow] method. No attribute needed.
Two confidence levels:
| Source | Confidence | How detected |
|---|---|---|
Result<T, TError> return type |
certain |
Generic type argument β exact, from symbol |
Fail(new XxxError(...)) in method body |
inferred |
Object creation in body scan |
Ensure(..., new XxxError(...)) in method body |
inferred |
Object creation in body scan |
public partial class OrderService
{
[ResultFlow]
public Result<Order, NotFoundError> GetOrder(int id) => ...;
[ResultFlow]
public Result<Order> PlaceOrder(OrderRequest req) =>
Result<Order>.Ok(new Order())
.Bind(ValidateRequest) // throws ValidationError
.Ensure(HasStock, new OutOfStockError("no stock"))
.Map(FulfillOrder);
}
Generated constant in Generated.ErrorTaxonomy.OrderService_ErrorTaxonomy:
public const string _ErrorTaxonomy = @"
| Method | Error Type | Confidence |
|---|---|---|
| GetOrder | NotFoundError | certain |
| PlaceOrder | OutOfStockError | inferred |
| PlaceOrder | ValidationError | inferred |
";
REslava.ResultFlow (syntax-only) uses a name heuristic instead of IError interface resolution β types ending in Error or Exception are matched. Confidence labels are identical.