Skip to content

Commit

Permalink
[image] add log for errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiencastan committed Oct 17, 2022
1 parent 31b213a commit c5bfaf5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/aliceVision/image/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,16 @@ namespace
char const* ALICEVISION_ROOT = std::getenv("ALICEVISION_ROOT");
if (ALICEVISION_ROOT == NULL)
{
// Output message with logging before throw as this function could be called before main.
ALICEVISION_LOG_ERROR("ALICEVISION_ROOT is not defined, embedded OCIO config file cannot be accessed.");
ALICEVISION_THROW_ERROR("ALICEVISION_ROOT is not defined, embedded OCIO config file cannot be accessed.");
}
configOCIOFilePath = std::string(ALICEVISION_ROOT);
configOCIOFilePath.append("/share/aliceVision/config.ocio");

if (!fs::exists(configOCIOFilePath))
{
ALICEVISION_LOG_ERROR("Embedded OCIO configuration file: '" << configOCIOFilePath << "' cannot be accessed.");
ALICEVISION_THROW_ERROR("Embedded OCIO configuration file: '" << configOCIOFilePath << "' cannot be accessed.");
}
else
Expand Down

0 comments on commit c5bfaf5

Please sign in to comment.