Skip to content

Commit ddc9459

Browse files
committed
Replace $Error
1 parent 6fc0762 commit ddc9459

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: TOOL-Resolve-ShortURL/Resolve-ShortURL.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function Resolve-ShortURL {
3737
(Invoke-WebRequest -Uri $URL -MaximumRedirection 0 -ErrorAction Ignore).Headers.Location
3838
}
3939
CATCH {
40-
Write-Error -Message $Error[0].Exception.Message
40+
$PSCmdlet.ThrowTerminatingError($_)
4141
}
4242
}
4343
}

0 commit comments

Comments
 (0)