A very minor error in the message of a ReteException in the Fact class ...

  final int findSlot(String slotname) throws ReteException
  {
    // try to find this slotname in the deftemplate
    int i;
    for (i=RU.FIRST_SLOT; i < m_deft.size(); i+=RU.DT_SLOT_SIZE)
      if (m_deft.get(i + RU.DT_SLOT_NAME).stringValue().equals(slotname))
        break;
    if (i >= m_deft.size())
      throw new ReteException("Fact::AddValue",
                              "Attempt to add field with invalid slotname",
                              slotname);
    return (i - RU.FIRST_SLOT) / RU.DT_SLOT_SIZE + RU.FIRST_SLOT;
  }

  final public Value findValue(String slotname) throws ReteException
  {
    int i = findSlot(slotname);
    return m_fact.get(i);
  }

  final public void addValue(String slotname, String value, int type)
       throws ReteException
  {
    int i = findSlot(slotname);
    m_fact.set(new Value(value, type),i);
  }
 
The ReteException message in the findSlot method suggests that the error is due to a call to
addValue ... in fact addValue and findValue both use findSlot. The message may
be misleading (although the trace would identify the real culprit).

Bob.
 

begin:vcard 
n:Orchard;Bob
tel;fax:613-952-7151
tel;home:613-521-9968
tel;work:613-993-8557
x-mozilla-html:TRUE
url:http://www.iit.nrc.ca
org:National Research Council of Canada;Institute for Information Technology
version:2.1
email;internet:[EMAIL PROTECTED]
title:Research Officer
adr;quoted-printable:;;Montreal Road=0D=0ABuilding M-50;Ottawa;Ontario;K1A 0R6;Canada
end:vcard

Reply via email to