Skip to content

Commit

Permalink
fix: Make JsonMaterialDecorator IO error more explicit (#1500)
Browse files Browse the repository at this point in the history
This has caused confusion because the error doesn't mention which file it's actually trying to open.
  • Loading branch information
paulgessinger committed Sep 7, 2022
1 parent 433a379 commit 087ed98
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class JsonMaterialDecorator : public IMaterialDecorator {
ACTS_VERBOSE("Reading JSON material description from: " << jFileName);
std::ifstream ifj(jFileName.c_str());
if (!ifj.good()) {
throw std::runtime_error{"Unable to open input JSON material file"};
throw std::runtime_error{"Unable to open input JSON material file: " +
jFileName};
}
nlohmann::json jin;

Expand Down

0 comments on commit 087ed98

Please sign in to comment.