Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '7zip/UI/Console/MainAr.cpp')
-rwxr-xr-x7zip/UI/Console/MainAr.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/7zip/UI/Console/MainAr.cpp b/7zip/UI/Console/MainAr.cpp
index a30298c1..35272a35 100755
--- a/7zip/UI/Console/MainAr.cpp
+++ b/7zip/UI/Console/MainAr.cpp
@@ -15,6 +15,7 @@
#endif
#include "../Common/ExitCode.h"
+#include "../Common/ArchiveCommandLine.h"
#include "ConsoleClose.h"
using namespace NWindows;
@@ -75,9 +76,10 @@ int numArguments, const char *arguments[]
// setlocale(LC_COLLATE, ".OCP");
NConsoleClose::CCtrlHandlerSetter ctrlHandlerSetter;
+ int res = 0;
try
{
- return Main2(
+ res = Main2(
#ifndef _WIN32
numArguments, arguments
#endif
@@ -93,6 +95,11 @@ int numArguments, const char *arguments[]
(*g_StdStream) << endl << kUserBreak;
return (NExitCode::kUserBreak);
}
+ catch(const CArchiveCommandLineException &e)
+ {
+ (*g_StdStream) << kExceptionErrorMessage << e << endl;
+ return (NExitCode::kUserError);
+ }
catch(const CSystemException &systemError)
{
if (systemError.ErrorCode == E_OUTOFMEMORY)
@@ -148,4 +155,5 @@ int numArguments, const char *arguments[]
(*g_StdStream) << kUnknownExceptionMessage;
return (NExitCode::kFatalError);
}
+ return res;
}