#3 An exception arises when browsing Instances

Errors
closed-fixed
Annoyances (7)
3
2004-07-29
2004-07-26
Francesco Garosi
No

When Class.NextInstance and
Class.NextSubclassInstance are invoked and there are
no more instance of the class, the module raises an
exception of type ClipsError, "M01: cannot directly
create Instance".

The message is obscure, and it would be preferable that
None is returned instead or a less out-of-context
exception is raised (e.g. "Mnn: no more instances"). To
be coherent with other Next...() function, probably
returning just None would do the job.

Discussion

    • status: open --> open-fixed
     
  • Logged In: YES
    user_id=328337

    The issue has been fixed by letting the above functions
    return None when there are no more instances.

     
    • status: open-fixed --> closed-fixed