mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
update openal
This commit is contained in:
parent
62f3b93ff9
commit
6721a6b021
287 changed files with 33851 additions and 27325 deletions
38
Engine/lib/openal-soft/common/alassert.cpp
Normal file
38
Engine/lib/openal-soft/common/alassert.cpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
|
||||
#include "alassert.h"
|
||||
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
namespace al {
|
||||
|
||||
[[noreturn]]
|
||||
void do_assert(const char *message, int linenum, const char *filename, const char *funcname) noexcept
|
||||
{
|
||||
std::string errstr{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();
|
||||
}
|
||||
}
|
||||
|
||||
} /* namespace al */
|
||||
Loading…
Add table
Add a link
Reference in a new issue