Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion components/core/src/clp_s/ArchiveWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ void ArchiveWriter::open(ArchiveWriterOption const& option) {

m_archive_path = archive_path.string();
if (false == std::filesystem::create_directory(m_archive_path, ec)) {
throw OperationFailed(ErrorCodeErrno, __FILENAME__, __LINE__);
SPDLOG_ERROR(
"Failed to create archive directory: \"{}\" - {} - {}",
Comment thread
gibber9809 marked this conversation as resolved.
Resolved
m_archive_path,
ec.message(),
ec.value()
);
throw OperationFailed(ErrorCodeFailure, __FILENAME__, __LINE__);
}

std::string var_dict_path = m_archive_path + constants::cArchiveVarDictFile;
Expand Down
7 changes: 6 additions & 1 deletion components/core/src/clp_s/clp-s.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,12 @@ int main(int argc, char const* argv[]) {
}

if (CommandLineArguments::Command::Compress == command_line_arguments.get_command()) {
if (false == compress(command_line_arguments)) {
try {
if (false == compress(command_line_arguments)) {
return 1;
}
} catch (std::exception const& e) {
SPDLOG_ERROR("Encountered error during compression - {}", e.what());
return 1;
}
} else if (CommandLineArguments::Command::Extract == command_line_arguments.get_command()) {
Expand Down