< Summary

Information
Class: Allyaria.Abstractions.Exceptions.AryInvalidOperationException
Assembly: Allyaria.Abstractions
File(s): /home/runner/work/allyaria/allyaria/src/Allyaria.Abstractions/Exceptions/AryInvalidOperationException.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 31
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%

File(s)

/home/runner/work/allyaria/allyaria/src/Allyaria.Abstractions/Exceptions/AryInvalidOperationException.cs

#LineLine coverage
 1namespace Allyaria.Abstractions.Exceptions;
 2
 3/// <summary>
 4/// Represents errors that occur when a method call is invalid for the object's current state. This exception extends
 5/// <see cref="AryException" /> to maintain Allyaria-specific exception handling semantics and ensure consistent error
 6/// reporting across the application.
 7/// </summary>
 8public sealed class AryInvalidOperationException : AryException
 9{
 10    /// <summary>
 11    /// Initializes a new instance of the <see cref="AryInvalidOperationException" /> class with an optional message, er
 12    /// code, and inner exception.
 13    /// </summary>
 14    /// <param name="message">A localized error message that describes the reason for the invalid operation.</param>
 15    /// <param name="errorCode">
 16    /// An optional structured error code identifying the invalid operation category. Defaults to
 17    /// <c>"ARY.INVALID_OPERATION"</c> when <see langword="null" /> or empty.
 18    /// </param>
 19    /// <param name="innerException">
 20    /// The underlying exception that caused the current exception, or <see langword="null" /> if
 21    /// none.
 22    /// </param>
 23    public AryInvalidOperationException(string? message = null,
 24        string? errorCode = null,
 25        Exception? innerException = null)
 2026        : base(
 2027            message: message,
 2028            errorCode: errorCode.OrDefaultIfEmpty(defaultValue: "ARY.INVALID_OPERATION"),
 2029            innerException: innerException
 4030        ) { }
 31}