Improve data not found error messages. #8295
Merged
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.
If the data directory or file is not found, output the exception message. If it was the directory that wasn't found, prompt the user to consider using Globals.DataFolder to make sure they are using the correct data folder if running in a docker container.
Description
Related Issue
N/A
Motivation and Context
I needed the improved error message to figure out why my data directory/files kept not being found. Since I made the changes anyways, I thought I might as well push them.
Requires Documentation Change
No
How Has This Been Tested?
I ran "lean build" and then used this custom image when using the lean cli to run a backtest with the wrong data directory. The error message was properly included.
Types of changes
Checklist:
Not sure how I would test this. The error message isn't returned by the function where it is generated. It gets incorporated into a new object that is created.
bug-<issue#>-<description>
orfeature-<issue#>-<description>