Skip to content
This repository was archived by the owner on Apr 12, 2022. It is now read-only.

Commit 4debe43

Browse files
Removing Exit #52
1 parent 54ce7b7 commit 4debe43

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

Public/Main/Get-WordDocument.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ function Get-WordDocument {
1919
$ErrorMessage = $_.Exception.Message
2020
if ($ErrorMessage -like '*Xceed.Document.NET.Licenser.LicenseKey property must be set to a valid license key in the code of your application before using this product.*') {
2121
Write-Warning "Get-WordDocument - PSWriteWord on .NET CORE works only with pay version. Please provide license key."
22-
Exit
22+
return
2323
} else {
2424
Write-Warning "Get-WordDocument - Document: $FilePath Error: $ErrorMessage"
25-
Exit
25+
return
2626
}
2727
}
2828
} else {

Public/Main/Merge-WordDocument.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
$ErrorMessage = $_.Exception.Message
1919
if ($ErrorMessage -like '*Xceed.Document.NET.Licenser.LicenseKey property must be set to a valid license key in the code of your application before using this product.*') {
2020
Write-Warning "Merge-WordDocument - PSWriteWord on .NET CORE works only with pay version. Please provide license key."
21-
Exit
21+
return
2222
} else {
2323
Write-Warning "Merge-WordDocument - Error: $ErrorMessage"
24-
Exit
24+
return
2525
}
2626
}
2727
if (-not $Supress) { return $FilePathOutput }

Public/Main/New-WordDocument.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ function New-WordDocument {
1717
$ErrorMessage = $_.Exception.Message
1818
if ($ErrorMessage -like '*Xceed.Document.NET.Licenser.LicenseKey property must be set to a valid license key in the code of your application before using this product.*') {
1919
Write-Warning "New-WordDocument - PSWriteWord on .NET CORE works only with pay version. Please provide license key."
20-
Exit
20+
return
2121
} else {
2222
Write-Warning "New-WordDocument - Document: $FilePath Error: $ErrorMessage"
23-
Exit
23+
return
2424
}
2525
}
2626
return $WordDocument

0 commit comments

Comments
 (0)