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