Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gff3-filter throws exception when field can't be converted to int or float #74

Closed
mamarjan opened this issue Oct 5, 2012 · 2 comments
Closed
Milestone

Comments

@mamarjan
Copy link
Owner

mamarjan commented Oct 5, 2012

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.

@mamarjan
Copy link
Owner Author

The solution using exceptions would kill performance. For floats, NaN could be used, but there is no equivalent for integers.

@mamarjan
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant