- handle undefined status/events fields
authorAleš Křenek <ljocha@ics.muni.cz>
Wed, 1 Aug 2007 11:42:28 +0000 (11:42 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Wed, 1 Aug 2007 11:42:28 +0000 (11:42 +0000)
- define failure_reasons

org.glite.lb.client-interface/interface/Event.h.T
org.glite.lb.client-interface/interface/JobStatus.h.T
org.glite.lb.client-interface/src/StatusAttrNames.pl

index 4639868..b2899f2 100644 (file)
@@ -84,7 +84,9 @@ public:
                }
                $c .= "\t */\n";
 
-               gen "$c\t\t$u = $EventAttrNums{$u},\n";
+               gen defined($EventAttrNums{$u}) ?
+                       "$c\t\t$u = $EventAttrNums{$u},\n" :
+                       "#error \"$u not defined in EventAttrNames\"\n";
        }
 @@@}
                ATTR_MAX /**< Limit for checking attribute code
index c50bf3a..fe26903 100644 (file)
@@ -73,7 +73,9 @@ public:
                $u =~ s/([a-z])([A-Z])/$1_$2/g;
                $u = uc $u;
 
-               gen "\t/** $f->{comment} */\n\t\t$u = $StatusAttrNums{$u},\n";
+               gen defined($StatusAttrNums{$u}) ? 
+                       "\t/** $f->{comment} */\n\t\t$u = $StatusAttrNums{$u},\n" :
+                       "#error \"$u not defined in StatusAttrNames\"\n";
        }
 @@@}
                 ATTR_MAX /**< Limit for range checking. */
index 30dcbb5..d58cafd 100644 (file)
@@ -66,4 +66,5 @@
        SUSPEND_REASON
        SUSPENDED
        USER_TAGS
+       FAILURE_REASONS
 /;