diff --git a/doc/31-Changelog.md b/doc/31-Changelog.md index c682741..457c11b 100644 --- a/doc/31-Changelog.md +++ b/doc/31-Changelog.md @@ -21,6 +21,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic * [#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 * [#248](https://github.com/Icinga/icinga-powershell-framework/pull/248) Improves `Test-IcingaPerformanceCounterCategory` by creating an object for the Performance Counter category provided and checking if it is a valid object instead of relying on the registry which might not contain all categories in the correct language. +* [#249](https://github.com/Icinga/icinga-powershell-framework/pull/249) Improves internal exception handler to get rid if misplaced `:` and adds all fields properly * [#250](https://github.com/Icinga/icinga-powershell-framework/pull/250) Improve error handling on plugin execution by informing the user if the plugin is simply not installed or the entire module was not loaded because of errors or missing dependencies ### 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,