2024-03-05 21:49:07 +01:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2021 suyu Emulator Project
|
2022-04-23 10:59:50 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2021-04-02 08:43:26 +02:00
|
|
|
|
|
|
|
#include "common/assert.h"
|
|
|
|
#include "common/common_funcs.h"
|
2023-12-25 13:50:22 +01:00
|
|
|
#include "common/logging/backend.h"
|
2021-04-02 08:43:26 +02:00
|
|
|
|
2021-04-15 01:07:40 +02:00
|
|
|
#include "common/settings.h"
|
2021-04-14 03:38:10 +02:00
|
|
|
|
2022-06-13 00:11:02 +02:00
|
|
|
void assert_fail_impl() {
|
|
|
|
if (Settings::values.use_debug_asserts) {
|
2023-12-25 13:50:22 +01:00
|
|
|
Common::Log::Stop();
|
2022-06-13 00:11:02 +02:00
|
|
|
Crash();
|
2021-04-14 03:38:10 +02:00
|
|
|
}
|
2021-04-02 08:43:26 +02:00
|
|
|
}
|
2022-06-07 23:02:29 +02:00
|
|
|
|
|
|
|
[[noreturn]] void unreachable_impl() {
|
2023-12-25 13:50:22 +01:00
|
|
|
Common::Log::Stop();
|
2022-06-07 23:02:29 +02:00
|
|
|
Crash();
|
|
|
|
throw std::runtime_error("Unreachable code");
|
|
|
|
}
|