Skip to content

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants