|
Re: Output to STDERR # Throw an exception and trap it;
# in the Trap output just the message and exit the script.
# Write-Host and the color variables are optional.
trap {
$errFrgrnd = $host.privatedata.ErrorForegroundColor
$errBckgrnd = $host.privatedata.ErrorBackgroundColor
write-host $_.exception.message -f $errFrgrnd -b $errBckgrnd
exit
}
throw "Your commit exceeds the maximum size allowed by this server."
--
Kiron |