Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
1
Task/Exceptions/PowerShell/exceptions-1.ps1
Normal file
1
Task/Exceptions/PowerShell/exceptions-1.ps1
Normal file
|
|
@ -0,0 +1 @@
|
|||
throw "Any error message."
|
||||
1
Task/Exceptions/PowerShell/exceptions-2.ps1
Normal file
1
Task/Exceptions/PowerShell/exceptions-2.ps1
Normal file
|
|
@ -0,0 +1 @@
|
|||
throw [System.IO.FileNotFoundException] ".\temp.txt not found."
|
||||
12
Task/Exceptions/PowerShell/exceptions-3.ps1
Normal file
12
Task/Exceptions/PowerShell/exceptions-3.ps1
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
try
|
||||
{
|
||||
Get-Content -Path .\temp.txt
|
||||
}
|
||||
catch [System.IO.FileNotFoundException]
|
||||
{
|
||||
Write-Host "File not found exception"
|
||||
}
|
||||
catch [System.Exception]
|
||||
{
|
||||
Write-Host "Other exception"
|
||||
}
|
||||
1
Task/Exceptions/PowerShell/exceptions-4.ps1
Normal file
1
Task/Exceptions/PowerShell/exceptions-4.ps1
Normal file
|
|
@ -0,0 +1 @@
|
|||
$Error[0] | Get-Member
|
||||
Loading…
Add table
Add a link
Reference in a new issue