Skip to content

Commit 04b1f35

Browse files
Merge pull request #34 from mgr32/dev
Logging inner exception messages in xArchive and xPackage. Closes #31
2 parents a515787 + b4009be commit 04b1f35

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

DSCResources/MSFT_xArchive/MSFT_xArchive.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Function Throw-TerminatingError
108108
)
109109

110110
$exception = new-object "System.InvalidOperationException" $Message,$ErrorRecord.Exception
111-
$errorRecord = New-Object System.Management.Automation.ErrorRecord $exception,"MachineStateIncorrect","InvalidOperation",$null
111+
$errorRecord = New-Object System.Management.Automation.ErrorRecord ($exception.ToString()),"MachineStateIncorrect","InvalidOperation",$null
112112
throw $errorRecord
113113
}
114114

DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Function Throw-TerminatingError
8585
)
8686

8787
$exception = new-object "System.InvalidOperationException" $Message,$ErrorRecord.Exception
88-
$errorRecord = New-Object System.Management.Automation.ErrorRecord $exception,"MachineStateIncorrect","InvalidOperation",$null
88+
$errorRecord = New-Object System.Management.Automation.ErrorRecord ($exception.ToString()),"MachineStateIncorrect","InvalidOperation",$null
8989
throw $errorRecord
9090
}
9191

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ Domain members may be specified using domain\name or Universal Principal Name (U
132132

133133
## Versions
134134

135+
### Unreleased
136+
137+
* Added logging inner exception messages in xArchive and xPackage resources
138+
135139
### 3.3.0.0
136140

137141
* Add support to xPackage resource for checking different registry hives

0 commit comments

Comments
 (0)