Skip to content

Commit

Permalink
Report file not found errors (fixes issue microsoft#8).
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Dahlström committed Mar 14, 2018
1 parent 499d554 commit fbe417d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions WindowsMRAssetConverter/CommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,18 @@ void CommandLine::ParseCommandLineArguments(
}
}

if (!std::experimental::filesystem::exists(inputFilePath))
{
throw std::invalid_argument("Input file not found.");
}
for (auto& lodFilePath : lodFilePaths)
{
if (!std::experimental::filesystem::exists(lodFilePath))
{
throw std::invalid_argument("Lod file not found.");
}
}

if (outFile.empty())
{
std::wstring inputFilePathWithoutExtension = inputFilePath;
Expand Down

0 comments on commit fbe417d

Please sign in to comment.