Path: blob/main/contrib/llvm-project/libcxx/src/stdexcept.cpp
35147 views
//===----------------------------------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include <__verbose_abort>9#include <new>10#include <stdexcept>11#include <string>1213#ifdef _LIBCPP_ABI_VCRUNTIME14# include "support/runtime/stdexcept_vcruntime.ipp"15#else16# include "support/runtime/stdexcept_default.ipp"17#endif1819_LIBCPP_BEGIN_NAMESPACE_STD2021_LIBCPP_NORETURN void __throw_runtime_error(const char* msg) {22#ifndef _LIBCPP_HAS_NO_EXCEPTIONS23throw runtime_error(msg);24#else25_LIBCPP_VERBOSE_ABORT("runtime_error was thrown in -fno-exceptions mode with message \"%s\"", msg);26#endif27}2829_LIBCPP_END_NAMESPACE_STD303132