Commit 3e343ca4 authored by Varun Khaneja's avatar Varun Khaneja Committed by Commit Bot

unrar: Use CHECK(false) instead of explicitly terminating process.

No change to README.chromium required since it already contains:
- Replace exceptions with terminating the current process. Guarded with the
  macro UNRAR_NO_EXCEPTIONS.

R=wfh

Bug: 750327,847635,767906
Change-Id: Ie5efe8b637f87647ea2972c115a2ac2464ef793d
Reviewed-on: https://chromium-review.googlesource.com/1081434Reviewed-by: default avatarWill Harris <wfh@chromium.org>
Commit-Queue: Varun Khaneja <vakh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565082}
parent fba4e0b6
// NOTE(vakh): The process.h file needs to be included first because "rar.hpp"
// defines certain macros that cause symbol redefinition errors
#if defined(UNRAR_NO_EXCEPTIONS)
#include "base/logging.h"
#include "base/process/process.h"
#endif // defined(UNRAR_NO_EXCEPTIONS)
......@@ -321,7 +322,7 @@ void ErrorHandler::Throw(RAR_EXIT Code)
#endif
SetErrorCode(Code);
#if defined(UNRAR_NO_EXCEPTIONS)
base::Process::Current().Terminate(Code, false);
CHECK(false) << "Failed with RAR_EXIT code: " << Code;
#else
throw Code;
#endif // defined(UNRAR_NO_EXCEPTIONS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment