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

#584 Add root config origin to exception #585

Merged
merged 2 commits into from
Sep 7, 2018
Merged

#584 Add root config origin to exception #585

merged 2 commits into from
Sep 7, 2018

Conversation

vaIgarashi
Copy link

@vaIgarashi vaIgarashi commented Sep 7, 2018

This change will improve config debuging process adding the root config line number

@lightbend-cla-validator
Copy link
Collaborator

Hi @Ensirius,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

http://www.lightbend.com/contribute/cla

@@ -153,7 +153,7 @@ static private AbstractConfigValue findKeyOrNull(AbstractConfigObject self, Stri
ConfigValueType expected, Path originalPath) {
AbstractConfigValue v = self.peekAssumingResolved(key, originalPath);
if (v == null)
throw new ConfigException.Missing(originalPath.render());
throw new ConfigException.Missing(self.origin(), originalPath);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think I'd rather keep the Path.render() here instead of making Path public. Otherwise the PR lgtm, thanks!

Copy link
Author

Choose a reason for hiding this comment

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

I used Path as argument because constructor with string argument ar used in Null exception

@havocp
Copy link
Collaborator

havocp commented Sep 7, 2018

CI needs to pass, though. probably there's a test failing?

@vaIgarashi
Copy link
Author

I got confused with constructors but i think I solved it now

@vaIgarashi
Copy link
Author

I have signed CLA

Copy link
Collaborator

@havocp havocp left a comment

Choose a reason for hiding this comment

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

Thanks!

@havocp havocp merged commit 2a103fe into lightbend:master Sep 7, 2018
@2m 2m added this to the 1.3.4 milestone Apr 18, 2019
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.

4 participants