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

Let VRT::Map#find_node accept nil values #29

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

adamrdavid
Copy link
Contributor

@adamrdavid adamrdavid commented May 30, 2018

Description

Make VRT::Map#find_node more durable to unexpected input

Checklist:

  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have added entries to CHANGELOG.md
  • I have not incremented version.rb

@maschwenk
Copy link
Contributor

@adamrdavid what do you think about putting this check in walk_tree instead?

@adamrdavid
Copy link
Contributor Author

@maschwenk the error that get's raised when string is nil comes from string + max_depth

I have updated the readme to better describe the situation.

@maschwenk
Copy link
Contributor

@adamrdavid I guess it makes no sense to try to cache invalid vrt_ids so this is ok

@adamrdavid
Copy link
Contributor Author

At any rate this needs to be added to get_lineage since that exhibits the same behavior of calling input + thing. If you think of a better place to put the check let me know.

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

Successfully merging this pull request may close these issues.

VRT::Map#find_node hits uninformative error when passed bad input
2 participants