2019-02-12 16:45:14 +01:00
|
|
|
//
|
2024-01-01 01:07:21 +01:00
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
|
2019-02-12 16:45:14 +01:00
|
|
|
//
|
|
|
|
// 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"
|
2021-05-17 14:21:11 +02:00
|
|
|
#include "td/utils/SliceBuilder.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";
|
2021-05-18 03:35:36 +02:00
|
|
|
::td::process_fatal_error(PSLICE() << "Check `" << message << "` failed in " << file << " at " << line << '\n');
|
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
|