Skip to content

Commit 718cc49

Browse files
committed
Add source exception as inner exception to AcmeExceptions
1 parent d555062 commit 718cc49

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Posh-ACME/Private/AcmeException.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class AcmeException : System.Exception
22
{
33
[PSObject]$Data
44

5-
AcmeException($Message,$Data) : base($Message) {
5+
AcmeException($Message,$Data,$Exception) : base($Message,$Exception) {
66
$this.Data = $Data
77
}
88
}

Posh-ACME/Private/Invoke-ACME.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function Invoke-ACME {
171171
}
172172

173173
# throw the converted AcmeException
174-
throw [AcmeException]::new($acmeError.detail,$acmeError)
174+
throw [AcmeException]::new($acmeError.detail,$acmeError,$ex)
175175
}
176176

177177

0 commit comments

Comments
 (0)