May be I'm wrong, but at runtime you can know in which rule your bad
index -3 has occured :
Jess reported an error in routine ValueVector.get
while executing (modify ?r1 (car-group-namee W) (days-required 4))
while executing defrule rule1_InitReservation
while executing (run).
Message: Bad index -3 in call to get() on this vector: (name nil -1 loc
nil -1 start-date nil -1 wizard nil -1 corp-account nil -1 days-required
nil -1 rate-type nil -1 res-num nil -1 car-group-name nil -1).
I hve modified the car-group-name to car-group-namee to obtain this Bad
index -3, and you can see that the problem is in rule1_InitReservation rule
(third line).
But I agree that a clearer message telling us that "car-group-namee is not a
valid slot for reservation template" could help.
Especially if you have a lot of templates and a lot of rules...
Emmanuel Lecharny, IKTEK
06 08 33 32 61, www.iktek.com <http://www.iktek.com>
-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De
la part de [EMAIL PROTECTED]
Envoye : mercredi 13 juin 2001 23:53
A : jess
Objet : Re: JESS: Stuck
> I think Michael McConnell wrote:
>
>> Jess> (batch AVIS\\avis-proto.clp)
>> Jess reported an error in routine ValueVector.get
>> while executing (batch
>> AVIS\avis-rules-proto-rules.clp)
>> while executing (batch AVIS\avis-proto.clp).
>> Message: Bad index -3 in call to get() on this
>> vector: (name nil -1 loc nil -1 s
>> 1 days-required nil -1 rate-type nil -1 res-num nil -1
>> car-group-name nil -1).
>> Program text: ( batch AVIS\avis-proto.clp ) at line
>> 1.
>
>
>That silly "Bad index -3" message always means you've mispelled the
>name of a slot, somewhere. I promise in Jess 6.0a7, it will finally be
>gone, and there will be clear, compile-time reporting of this
>kind of error.
Oh, thank-you, thank-you, THANK-YOU! The clear reporting of this type of
error
would be very, very helpful!
What I've found helps is to turn on all watches with a "(watch all)". JESS
will
then at least tell you what the last good rule was before it encountered its
"bad index". And since it processes the rules in order in the file, you
have a
pretty good guess as to which rule is causing the problem.
-Chuck.
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify
[EMAIL PROTECTED]
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------