namespace Build.Tools; /// /// Ends the build script with an exit code, after the command has said what went wrong. /// /// /// A release runs several commands one after another, and a failure deep inside one of them has to end /// the whole release, so that nothing is built on top of half-prepared metadata or broken artifacts. /// Program.cs turns the exception into the exit code and prints nothing more: the command already /// explained the failure, and a stack trace would only bury that explanation. /// /// The exit code of the build script, where anything but zero is a failure. public sealed class CommandExitedException(int exitCode) : Exception { /// /// The exit code the build script ends with. /// public int ExitCode { get; } = exitCode; }