Mark Exception::Throw as noreturn, fix windows build.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
1be055760a
commit
52130fa8a5
|
@ -61,6 +61,17 @@ namespace ArbUt {
|
|||
#endif
|
||||
{
|
||||
}
|
||||
template <typename... Args>
|
||||
[[noreturn]] static void Throw(const std::string& expression, const std::source_location& location,
|
||||
const Args... args) {
|
||||
std::stringstream error;
|
||||
error << "[" << file_name(location.file_name()) << ":" << location.line() << "] \"";
|
||||
error << expression;
|
||||
using List = int[];
|
||||
(void)List{0, ((void)(error << args), 0)...};
|
||||
error << "\"";
|
||||
throw Exception(error.str());
|
||||
}
|
||||
|
||||
/// @brief Returns the error message of the exception.
|
||||
[[nodiscard]] const char* what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW final {
|
||||
|
@ -117,17 +128,6 @@ namespace ArbUt {
|
|||
return ss.str();
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
static void Throw(const std::string& expression, const std::source_location& location, const Args... args) {
|
||||
std::stringstream error;
|
||||
error << "[" << file_name(location.file_name()) << ":" << location.line() << "] \"";
|
||||
error << expression;
|
||||
using List = int[];
|
||||
(void)List{0, ((void)(error << args), 0)...};
|
||||
error << "\"";
|
||||
throw Exception(error.str());
|
||||
}
|
||||
|
||||
private:
|
||||
static void AppendNoSourceStack(std::stringstream& ss, const backward::ResolvedTrace& trace,
|
||||
bool include_addr) {
|
||||
|
|
Loading…
Reference in New Issue