mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Rewrite exception handler
This commit is contained in:
parent
527b3951ba
commit
42626dab45
2 changed files with 6 additions and 1 deletions
|
|
@ -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`
|
* [#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
|
* [#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
|
* [#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
|
### Bugfixes
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,12 @@ function Exit-IcingaThrowException()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
if ($null -eq $ExceptionMessageLib -Or [string]::IsNullOrEmpty($ExceptionName)) {
|
||||||
$ExceptionName = [string]::Format('{0} Exception', $ExceptionTypeString);
|
$ExceptionName = [string]::Format('{0} Exception', $ExceptionTypeString);
|
||||||
|
if ([string]::IsNullOrEmpty($InputString)) {
|
||||||
|
$InputString = $ExceptionThrown;
|
||||||
|
}
|
||||||
$ExceptionThrown = [string]::Format(
|
$ExceptionThrown = [string]::Format(
|
||||||
'{0} exception occured:{1}{2}',
|
'{0} exception occured:{1}{2}',
|
||||||
$ExceptionTypeString,
|
$ExceptionTypeString,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue