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()
52
52
[string ]$ExceptionName = ' ' ;
53
53
[string ]$ExceptionIWKB = $KnowledgeBaseId ;
54
54
55
- if ($ExceptionThrown -is [hashtable ]) {
56
- $ExceptionIWKB = $ExceptionThrown.IWKB ;
57
- $ExceptionThrown = $ExceptionThrown.Message ;
58
- }
59
-
60
55
if ($null -ne $ExceptionMessageLib ) {
61
56
foreach ($definedError in $ExceptionMessageLib.Keys ) {
62
57
if ($ExceptionMessageLib .$definedError -eq $ExceptionThrown ) {
@@ -74,6 +69,11 @@ function Exit-IcingaThrowException()
74
69
);
75
70
}
76
71
72
+ if ($ExceptionThrown -is [hashtable ]) {
73
+ $ExceptionIWKB = $ExceptionThrown.IWKB ;
74
+ $ExceptionThrown = $ExceptionThrown.Message ;
75
+ }
76
+
77
77
if ([string ]::IsNullOrEmpty($ExceptionIWKB ) -eq $FALSE ) {
78
78
$ExceptionIWKB = [string ]::Format(
79
79
' {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