2019-02-12 16:45:14 +01:00
|
|
|
//
|
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2019
|
|
|
|
//
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
//
|
|
|
|
#include "td/utils/check.h"
|
2019-02-12 21:19:11 +01:00
|
|
|
|
2019-02-12 16:45:14 +01:00
|
|
|
#include "td/utils/logging.h"
|
2019-02-13 00:29:52 +01:00
|
|
|
#include "td/utils/Slice.h"
|
2019-02-12 21:19:11 +01:00
|
|
|
|
2019-02-12 16:45:14 +01:00
|
|
|
namespace td {
|
|
|
|
namespace detail {
|
2019-02-12 21:19:11 +01:00
|
|
|
|
2019-02-12 18:48:13 +01:00
|
|
|
void process_check_error(const char *message, const char *file, int line) {
|
|
|
|
::td::Logger(*log_interface, log_options, VERBOSITY_NAME(FATAL), Slice(file), line, Slice())
|
|
|
|
<< "Check `" << message << "` failed";
|
|
|
|
::td::process_fatal_error(PSLICE() << "Check `" << message << "` failed in " << file << " at " << line);
|
2019-02-12 16:45:14 +01:00
|
|
|
}
|
2019-02-12 18:48:13 +01:00
|
|
|
|
2019-02-12 16:45:14 +01:00
|
|
|
} // namespace detail
|
|
|
|
} // namespace td
|