Path: redb-route/redb.Route/Validation/RouteValidationException.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route/Validation/RouteValidationException.cs
----
using System;
using System.Collections.Generic;
namespace redb.Route.Validation;
///
/// Thrown when a route definition fails structural validation before compilation.
/// Contains all detected issues in .
///
public sealed class RouteValidationException : InvalidOperationException
{
/// Route identifier, or null if unnamed.
public string? RouteId { get; }
/// All validation errors detected.
public IReadOnlyList Errors { get; }
/// Creates a route validation exception.
/// Route identifier.
/// List of validation errors.
public RouteValidationException(string? routeId, IReadOnlyList errors)
: base($"Route '{routeId ?? "(unnamed)"}' validation failed:\n - "
+ string.Join("\n - ", errors))
{
RouteId = routeId;
Errors = errors;
}
}