namespace StellaOps.Cli.Commands.Scan; internal enum BinaryDiffErrorCode { InvalidReference, AuthFailed, PlatformNotFound, UnsupportedMode, RegistryAuthInvalid, SigningKeyInvalid } internal sealed class BinaryDiffException : Exception { public BinaryDiffException(BinaryDiffErrorCode code, string message, Exception? innerException = null) : base(message, innerException) { Code = code; } public BinaryDiffErrorCode Code { get; } public int ExitCode => Code switch { BinaryDiffErrorCode.AuthFailed => 2, BinaryDiffErrorCode.PlatformNotFound => 3, _ => 1 }; }