Closed mamarjan closed 12 years ago
The solution using exceptions would kill performance. For floats, NaN could be used, but there is no equivalent for integers.
Now when a field cannot be converted to a boolean (i.e. it's not "true" or "false"), or an integer, or floating point number, the filter returns false and the record doesn't pass the filter.
For example, when running with "field feature == 5", there is an exception. Need to decide if this should be an error, a warning, and how to handle this, using exceptions or something else.
Another example, which makes it all more complicated, is this: "(attr some_number - 5) == 0". Currently in the code I would have to return some default number for "some_number", or use an exception and catch it somewhere.