Emit errors using Write-Error
This commit is contained in:
parent
8d7835a8aa
commit
9e716bce4f
|
@ -110,7 +110,7 @@ $null = New-Module {
|
|||
$result;
|
||||
}
|
||||
catch {
|
||||
throw $Error;
|
||||
Write-Error "$Error";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ $null = New-Module {
|
|||
if ($element) {
|
||||
$Browser.FindElement([OpenQA.Selenium.By]::CssSelector($ButtonSelector)).Click();
|
||||
} else {
|
||||
throw "Unable to find download button!";
|
||||
Write-Error "Unable to find download button!";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ $null = New-Module {
|
|||
if (Test-Path $errorPath) {
|
||||
$errorMessage = Get-Content $errorPath;
|
||||
Remove-Item $errorPath;
|
||||
throw $errorMessage;
|
||||
Write-Error $errorMessage;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue