mirror of
https://github.com/transmission/transmission
synced 2024-12-28 02:27:41 +00:00
ebb2ab6aee
Use SPDX license list 3.0 terminology: replace deprecated identifiers GPL-2.0" and "GPL-3.0" with "GPL-3.0-only" and "GPL-3.0-only".
28 lines
694 B
C++
28 lines
694 B
C++
// This file Copyright © 2017-2022 Mnemosyne LLC.
|
|
// It may be used under GPLv2 (SPDX: GPL-2.0-only), GPLv3 (SPDX: GPL-3.0-only),
|
|
// or any future license endorsed by Mnemosyne LLC.
|
|
// License text can be found in the licenses/ folder.
|
|
|
|
#include <cstdarg>
|
|
#include <cstdio>
|
|
#include <cstdlib>
|
|
|
|
#include "tr-assert.h"
|
|
|
|
#if !defined(NDEBUG) || defined(TR_FORCE_ASSERTIONS)
|
|
|
|
[[noreturn]] bool tr_assert_report(char const* file, int line, char const* message_fmt, ...)
|
|
{
|
|
va_list args;
|
|
va_start(args, message_fmt);
|
|
|
|
fprintf(stderr, "assertion failed: ");
|
|
vfprintf(stderr, message_fmt, args);
|
|
fprintf(stderr, " (%s:%d)\n", file, line);
|
|
|
|
va_end(args);
|
|
|
|
abort();
|
|
}
|
|
|
|
#endif
|