From 9f2a6c42cd95b24d069b2d7b105496ea8664e26e Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Sat, 20 Jul 2019 13:49:03 -0400 Subject: [PATCH] Change error to Throw --- ZertoApiWrapper/Public/Edit-ZertoVra.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ZertoApiWrapper/Public/Edit-ZertoVra.ps1 b/ZertoApiWrapper/Public/Edit-ZertoVra.ps1 index acf1693..1a0e40b 100644 --- a/ZertoApiWrapper/Public/Edit-ZertoVra.ps1 +++ b/ZertoApiWrapper/Public/Edit-ZertoVra.ps1 @@ -39,7 +39,7 @@ function Edit-ZertoVra { # Get the current VRA information for use if an updated parameter is not supplied $vra = Get-ZertoVra -vraIdentifier $vraIdentifier if ( -not $vra ) { - Write-Error "VRA with Identifier: $vraIdentifier could not be found. Please check the ID and try again." + Throw "VRA with Identifier: $vraIdentifier could not be found. Please check the ID and try again." } } @@ -87,4 +87,4 @@ function Edit-ZertoVra { # Nothing to Do } } -#TODO: Refactor \ No newline at end of file +#TODO: Refactor