Changeset 10767:30d02c31b580 in orange


Ignore:
Timestamp:
04/05/12 17:16:05 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

BUG: Raise an exception if no examples are supplied to the learner (instead of a failing assert).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/orange/tdidt_simple.cpp

    r10492 r10767  
    633633        raiseError("class-less domain"); 
    634634 
     635    if (!ogen->numberOfExamples() > 0) 
     636        raiseError("no examples"); 
     637 
    635638    /* create a tabel with pointers to examples */ 
    636639    ASSERT(examples = (struct Example *)calloc(ogen->numberOfExamples(), sizeof *examples)); 
Note: See TracChangeset for help on using the changeset viewer.