| | | 1 | | namespace NexusLabs.Needlr.AgentFramework.Providers; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Base exception type thrown by <see cref="ITieredProviderSelector{TQuery, TResult}"/> |
| | | 5 | | /// when it cannot return a result because no provider is available to serve the request. |
| | | 6 | | /// </summary> |
| | | 7 | | /// <remarks> |
| | | 8 | | /// <para> |
| | | 9 | | /// Concrete subtypes describe the specific reason no provider was available: |
| | | 10 | | /// </para> |
| | | 11 | | /// <list type="bullet"> |
| | | 12 | | /// <item><see cref="NoProvidersRegisteredException"/> — no enabled providers were registered.</item> |
| | | 13 | | /// <item><see cref="AllProvidersFailedException"/> — every registered provider failed or was gated out.</item> |
| | | 14 | | /// </list> |
| | | 15 | | /// <para> |
| | | 16 | | /// Callers can catch this base type to handle both conditions uniformly, or catch a |
| | | 17 | | /// concrete subtype for more granular handling. |
| | | 18 | | /// </para> |
| | | 19 | | /// </remarks> |
| | | 20 | | public class NoProvidersAvailableException : Exception |
| | | 21 | | { |
| | | 22 | | /// <param name="message">A description of why no provider was available.</param> |
| | | 23 | | public NoProvidersAvailableException(string message) |
| | 13 | 24 | | : base(message) |
| | | 25 | | { |
| | 13 | 26 | | } |
| | | 27 | | |
| | | 28 | | /// <param name="message">A description of why no provider was available.</param> |
| | | 29 | | /// <param name="innerException">The underlying exception that caused this failure, if any.</param> |
| | | 30 | | public NoProvidersAvailableException(string message, Exception? innerException) |
| | 1 | 31 | | : base(message, innerException) |
| | | 32 | | { |
| | 1 | 33 | | } |
| | | 34 | | } |