print error message when unable to check for project path existence

Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
folling 2024-02-12 16:10:41 +01:00 committed by Folling
parent f3523fbe31
commit f44fe4611d
Signed by: folling
SSH key fingerprint: SHA256:S9qEx5WCFFLK49tE/LKnKuJYM5sw+++Dn6qJbbyxnCY

View file

@ -70,7 +70,12 @@ IkarusProject * ikarus_project_create(char const * path, char const * name, Ikar
boost::system::error_code ec; boost::system::error_code ec;
bool const exists = fs::exists(fs_path, ec); bool const exists = fs::exists(fs_path, ec);
IKARUS_FAIL_IF(ec, nullptr, "unable to check whether path is occupied", IkarusErrorInfo_Filesystem_AlreadyExists); IKARUS_FAIL_IF(
ec,
nullptr,
fmt::format("unable to check whether path is occupied: {}", ec.message()),
IkarusErrorInfo_Filesystem_AlreadyExists
);
IKARUS_FAIL_IF(exists, nullptr, "path is already occupied", IkarusErrorInfo_Filesystem_AlreadyExists); IKARUS_FAIL_IF(exists, nullptr, "path is already occupied", IkarusErrorInfo_Filesystem_AlreadyExists);
} }