Throwing an exception if the file does not exist
This commit is contained in:
@@ -88,7 +88,7 @@ namespace OpenVulkano
|
|||||||
else if (archiveResult <= ARCHIVE_FAILED) lvl = spdlog::level::level_enum::err;
|
else if (archiveResult <= ARCHIVE_FAILED) lvl = spdlog::level::level_enum::err;
|
||||||
const char* errorString = archive_error_string(arch);
|
const char* errorString = archive_error_string(arch);
|
||||||
if (logger) logger->log(lvl, errorString ? errorString : "Unknown error while handling archive");
|
if (logger) logger->log(lvl, errorString ? errorString : "Unknown error while handling archive");
|
||||||
if (archiveResult == ARCHIVE_FAILED) throw std::runtime_error(errorString);
|
if (archiveResult == ARCHIVE_FAILED || archiveResult == ARCHIVE_FATAL) throw std::runtime_error(errorString);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user