File tree Expand file tree Collapse file tree 2 files changed +21
-13
lines changed Expand file tree Collapse file tree 2 files changed +21
-13
lines changed Original file line number Diff line number Diff line change 1
1
#How to use:
2
2
3
3
#Positive Test Case
4
- RetryCommand -Command {
5
-
6
- Write-Host "Hello World!!!"
7
4
8
- } -MaxRetry 3
5
+ RetryCommand -Command {
6
+
7
+ Write-Host "Hello World!!!"
8
+
9
+ } -MaxRetry 3
9
10
10
11
11
12
12
13
#Negative Test Case
13
- RetryCommand -Command {
14
-
15
- Write-Host "Exception is going to occur"
16
- throw 'logic throw exception'
17
-
18
- } -MaxRetry 3 -RetryDelay 2 -ExceptionCallBack {
19
- param($exception)
20
- Write-ErrorLog "Here is your exception info:: $($exception.Message)"
21
- }
14
+
15
+ RetryCommand -Command {
16
+
17
+ Write-Host "Exception is going to occur"
18
+ throw 'logic throw exception'
19
+
20
+ } -MaxRetry 3 -RetryDelay 2 -ExceptionCallBack {
21
+ param($exception)
22
+ Write-ErrorLog "Here is your exception info:: $($exception.Message)"
23
+ }
Original file line number Diff line number Diff line change 1
1
# PowerShell-Helper-Scripts
2
2
PowerShell Helper Scripts
3
+
4
+
5
+ ## Table of Contents
6
+
7
+ - [ Retry Pattern] ( gouravdwivedi6590/PowerShell-Helper-Scripts/blob/master/PSScripts/RetryPattern/ReadMe.md )
8
+ -
You can’t perform that action at this time.
0 commit comments