Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Exceptions/PowerShell/exceptions-1.psh
Normal file
1
Task/Exceptions/PowerShell/exceptions-1.psh
Normal file
|
|
@ -0,0 +1 @@
|
|||
throw "Any error message."
|
||||
1
Task/Exceptions/PowerShell/exceptions-2.psh
Normal file
1
Task/Exceptions/PowerShell/exceptions-2.psh
Normal file
|
|
@ -0,0 +1 @@
|
|||
throw [System.IO.FileNotFoundException] ".\temp.txt not found."
|
||||
12
Task/Exceptions/PowerShell/exceptions-3.psh
Normal file
12
Task/Exceptions/PowerShell/exceptions-3.psh
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.psh
Normal file
1
Task/Exceptions/PowerShell/exceptions-4.psh
Normal file
|
|
@ -0,0 +1 @@
|
|||
$Error[0] | Get-Member
|
||||
Loading…
Add table
Add a link
Reference in a new issue