mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Adds stacktrace for plugin runtime error
This commit is contained in:
parent
eb5dd020b5
commit
41f8b2a7e5
2 changed files with 5 additions and 3 deletions
|
|
@ -17,7 +17,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
|||
* [#234](https://github.com/Icinga/icinga-powershell-framework/pull/234) Adds support to allow custom exception lists for Icinga Exceptions, making it easier for different modules to ship their own exception messages
|
||||
* [#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
|
||||
|
||||
### Bugfixes
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,10 @@ function Exit-IcingaExecutePlugin()
|
|||
|
||||
exit (& $Command @args);
|
||||
} catch {
|
||||
$ExMsg = $_.Exception.Message;
|
||||
Write-IcingaConsolePlain '[UNKNOWN]: {0}{1}{1}CheckCommand: {2}{1}Arguments: {3}' -Objects $ExMsg, (New-IcingaNewLine), $Command, $args;
|
||||
$ExMsg = $_.Exception.Message;
|
||||
$StackTrace = $_.ScriptStackTrace;
|
||||
|
||||
Write-IcingaConsolePlain '[UNKNOWN] Icinga Exception: {0}{1}{1}CheckCommand: {2}{1}Arguments: {3}{1}{1}StackTrace:{1}{4}' -Objects $ExMsg, (New-IcingaNewLine), $Command, $args, $StackTrace;
|
||||
exit 3;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue