Adds trace while allowing missing file by returing empty parse value#550
Merged
havocp merged 1 commit intolightbend:masterfrom Mar 2, 2018
Merged
Adds trace while allowing missing file by returing empty parse value#550havocp merged 1 commit intolightbend:masterfrom
havocp merged 1 commit intolightbend:masterfrom
Conversation
Collaborator
|
Hi @sathiyapk, 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: |
Contributor
Author
|
I did sign the CLA. |
havocp
approved these changes
Mar 2, 2018
Contributor
havocp
left a comment
There was a problem hiding this comment.
Thanks! Seems useful to me.
| } catch (IOException e) { | ||
| if (finalOptions.getAllowMissing()) { | ||
| trace(e.getMessage() + ". Allowing Missing File, this can be turned off by setting" + | ||
| " ConfigParseOptions.allowMissing = false"); |
Contributor
There was a problem hiding this comment.
Does the filename end up in this message somehow? (not sure if it's in getMessage or added by trace or what)
Contributor
Author
There was a problem hiding this comment.
@havocp thanks for your comment!
This is one of the messages from trace:
resource not found on classpath: nothere.json. Allowing Missing File, this can be turned off by setting ConfigParseOptions.allowMissing = false
So i think it does.
aalleexxeeii
pushed a commit
to aalleexxeeii/typesafe-config
that referenced
this pull request
Jun 6, 2018
Adds trace while allowing missing file by returing empty parse value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
People come from Java background would expect
FileNotFoundExceptionif there's any problem in reading a file. But for some reason, the default value of theConfigParseOptions.allowMissingis set to true, so i think i would be helpful to log this info. I kept it undertrace, so it would help people who wanted to debug what's going wrong.