Skip to content

Commit

Permalink
Switch runtime enable/disable validation to throw a CommandException
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianstevens committed Mar 19, 2024
1 parent 8312308 commit 717097a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override async ValueTask ExecuteCommand()

if (state == true)
{
Logger?.LogError("Failed to disable runtime");
throw new CommandException("Failed to disable runtime");
}

Logger?.LogInformation($"Runtime is {(state ? "ENABLED" : "DISABLED")}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override async ValueTask ExecuteCommand()

if (state == false)
{
Logger?.LogError("Failed to enable runtime");
throw new CommandException("Failed to enable runtime");
}

Logger?.LogInformation($"Runtime is {(state ? "ENABLED" : "DISABLED")}");
Expand Down

0 comments on commit 717097a

Please sign in to comment.