diff --git a/doc/31-Changelog.md b/doc/31-Changelog.md index 818ced5..eb89e18 100644 --- a/doc/31-Changelog.md +++ b/doc/31-Changelog.md @@ -18,6 +18,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic * [#235](https://github.com/Icinga/icinga-powershell-framework/pull/235) Adds new Cmdlet `Show-IcingaEventLogAnalysis` to get a better overview on how many log entries are present within the EventLog based on hour, minute and day average/maximum for allowing a more dynamic configuration for `Invoke-IcingaCheckEventLog` * [#241](https://github.com/Icinga/icinga-powershell-framework/pull/241) Ensures we use TLS 1.1 and 1.2 for REST-Api calls, as used certificates in general are created with these * [#243](https://github.com/Icinga/icinga-powershell-framework/pull/243) Adds stacktrace output for exceptions in case plugin execution fails +* [#249](https://github.com/Icinga/icinga-powershell-framework/pull/249) Improves internal exception handler to get rid if misplaced `:` and adds all fields properly ### Bugfixes diff --git a/lib/icinga/exception/Exit-IcingaThrowException.psm1 b/lib/icinga/exception/Exit-IcingaThrowException.psm1 index 0256289..60457e2 100644 --- a/lib/icinga/exception/Exit-IcingaThrowException.psm1 +++ b/lib/icinga/exception/Exit-IcingaThrowException.psm1 @@ -64,8 +64,12 @@ function Exit-IcingaThrowException() break; } } - } else { + } + if ($null -eq $ExceptionMessageLib -Or [string]::IsNullOrEmpty($ExceptionName)) { $ExceptionName = [string]::Format('{0} Exception', $ExceptionTypeString); + if ([string]::IsNullOrEmpty($InputString)) { + $InputString = $ExceptionThrown; + } $ExceptionThrown = [string]::Format( '{0} exception occured:{1}{2}', $ExceptionTypeString,