audit, advisories and doctors/setup work
This commit is contained in:
29
src/Cli/StellaOps.Cli/Commands/Scan/BinaryDiffErrors.cs
Normal file
29
src/Cli/StellaOps.Cli/Commands/Scan/BinaryDiffErrors.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
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
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user