mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-20 20:05:33 +00:00
update openal-soft to 1.24.3
keeping the alt 87514151c4 (diff-73a8dc1ce58605f6c5ea53548454c3bae516ec5132a29c9d7ff7edf9730c75be)
This commit is contained in:
parent
12db0500e8
commit
ba32094b7b
276 changed files with 49304 additions and 8712 deletions
|
|
@ -1,38 +1,44 @@
|
|||
|
||||
#include "alassert.h"
|
||||
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
namespace {
|
||||
|
||||
[[noreturn]]
|
||||
void throw_error(const std::string &message)
|
||||
{
|
||||
throw std::runtime_error{message};
|
||||
}
|
||||
|
||||
} /* namespace */
|
||||
|
||||
namespace al {
|
||||
|
||||
[[noreturn]]
|
||||
void do_assert(const char *message, int linenum, const char *filename, const char *funcname) noexcept
|
||||
{
|
||||
std::string errstr{filename};
|
||||
/* Throwing an exception that tries to leave a noexcept function will
|
||||
* hopefully cause the system to provide info about the caught exception in
|
||||
* an error dialog. At least on Linux, this results in the process printing
|
||||
*
|
||||
* terminate called after throwing an instance of 'std::runtime_error'
|
||||
* what(): <message here>
|
||||
*
|
||||
* before terminating from a SIGABRT. Hopefully Windows and Mac will do the
|
||||
* appropriate things with the message to alert the user about an abnormal
|
||||
* termination.
|
||||
*/
|
||||
auto errstr = std::string{filename};
|
||||
errstr += ':';
|
||||
errstr += std::to_string(linenum);
|
||||
errstr += ": ";
|
||||
errstr += funcname;
|
||||
errstr += ": ";
|
||||
errstr += message;
|
||||
/* Calling std::terminate in a catch block hopefully causes the system to
|
||||
* provide info about the caught exception in the error dialog. At least on
|
||||
* Linux, this results in the process printing
|
||||
*
|
||||
* terminate called after throwing an instance of 'std::runtime_error'
|
||||
* what(): <message here>
|
||||
*
|
||||
* before terminating from a SIGABRT. Hopefully Windows and Mac will do the
|
||||
* appropriate things with the message for an abnormal termination.
|
||||
*/
|
||||
try {
|
||||
throw std::runtime_error{errstr};
|
||||
}
|
||||
catch(...) {
|
||||
std::terminate();
|
||||
}
|
||||
|
||||
throw_error(errstr);
|
||||
}
|
||||
|
||||
} /* namespace al */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue