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

Use YAML::BadConversion exception to catch undefined and invalid YAML parameters #1251

Open
wants to merge 1 commit into
base: noetic-devel
Choose a base branch
from

Conversation

AlaHammouda
Copy link

This pull request addresses issue #1010

  • Use YAML::BadConversion exception to catch undefined and invalid YAML parameters.

@@ -210,25 +210,25 @@ class MapServer
#endif
try {
doc["resolution"] >> res;
} catch (YAML::InvalidScalar &) {
} catch (YAML::BadConversion &) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know YAML exceptions well - but should we instead be using the parent class of both InvalidScalar and BadConversion - YAML::RepresentationException?

@maker-ATOM
Copy link

Setting,

resolution: "0.050000"

within the .yaml

Allows the current method to parse the resolution, is this acceptable?

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

Successfully merging this pull request may close these issues.

None yet

4 participants