Skip to content

Commit

Permalink
Add source exception as inner exception to AcmeExceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbolger committed Feb 8, 2025
1 parent d555062 commit 718cc49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Posh-ACME/Private/AcmeException.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class AcmeException : System.Exception
{
[PSObject]$Data

AcmeException($Message,$Data) : base($Message) {
AcmeException($Message,$Data,$Exception) : base($Message,$Exception) {
$this.Data = $Data
}
}
2 changes: 1 addition & 1 deletion Posh-ACME/Private/Invoke-ACME.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function Invoke-ACME {
}

# throw the converted AcmeException
throw [AcmeException]::new($acmeError.detail,$acmeError)
throw [AcmeException]::new($acmeError.detail,$acmeError,$ex)
}


Expand Down

0 comments on commit 718cc49

Please sign in to comment.