File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,6 @@ function Exit-IcingaThrowException()
5252 [string ]$ExceptionName = ' ' ;
5353 [string ]$ExceptionIWKB = $KnowledgeBaseId ;
5454
55- if ($ExceptionThrown -is [hashtable ]) {
56- $ExceptionIWKB = $ExceptionThrown.IWKB ;
57- $ExceptionThrown = $ExceptionThrown.Message ;
58- }
59-
6055 if ($null -ne $ExceptionMessageLib ) {
6156 foreach ($definedError in $ExceptionMessageLib.Keys ) {
6257 if ($ExceptionMessageLib .$definedError -eq $ExceptionThrown ) {
@@ -74,6 +69,11 @@ function Exit-IcingaThrowException()
7469 );
7570 }
7671
72+ if ($ExceptionThrown -is [hashtable ]) {
73+ $ExceptionIWKB = $ExceptionThrown.IWKB ;
74+ $ExceptionThrown = $ExceptionThrown.Message ;
75+ }
76+
7777 if ([string ]::IsNullOrEmpty($ExceptionIWKB ) -eq $FALSE ) {
7878 $ExceptionIWKB = [string ]::Format(
7979 ' {0}{0}Further details can be found on the Icinga for Windows Knowledge base: https://icinga.com/docs/windows/latest/doc/knowledgebase/{1}' ,
You can’t perform that action at this time.
0 commit comments