Small fix
This commit is contained in:
parent
9339e572a0
commit
9019f9c299
|
@ -1,9 +1,7 @@
|
||||||
#ifndef TOOLS_H_INCLUDE
|
#ifndef TOOLS_H_INCLUDE
|
||||||
#define TOOLS_H_INCLUDE
|
#define TOOLS_H_INCLUDE
|
||||||
|
|
||||||
#define INTERNAL_BUILD 1 //when internal build is true and an assertion is hit, you have the option to debug or ignore
|
#define INTERNAL_BUILD 1
|
||||||
//when internal build if false and an asertion is hit, the error is reported and the program
|
|
||||||
//closes
|
|
||||||
|
|
||||||
|
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
|
@ -50,15 +48,9 @@ inline void assertFuncProduction(
|
||||||
|
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case IDOK: // Abort the program:
|
case IDOK:
|
||||||
{
|
{
|
||||||
raise(SIGABRT);
|
raise(SIGABRT);
|
||||||
|
|
||||||
// We won't usually get here, but it's possible that a user-registered
|
|
||||||
// abort handler returns, so exit the program immediately. Note that
|
|
||||||
// even though we are "aborting," we do not call abort() because we do
|
|
||||||
// not want to invoke Watson (the user has already had an opportunity
|
|
||||||
// to debug the error and chose not to).
|
|
||||||
_exit(3);
|
_exit(3);
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -100,27 +92,21 @@ inline void assertFuncInternal(
|
||||||
|
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case IDABORT: // Abort the program:
|
case IDABORT:
|
||||||
{
|
{
|
||||||
raise(SIGABRT);
|
raise(SIGABRT);
|
||||||
|
|
||||||
// We won't usually get here, but it's possible that a user-registered
|
|
||||||
// abort handler returns, so exit the program immediately. Note that
|
|
||||||
// even though we are "aborting," we do not call abort() because we do
|
|
||||||
// not want to invoke Watson (the user has already had an opportunity
|
|
||||||
// to debug the error and chose not to).
|
|
||||||
_exit(3);
|
_exit(3);
|
||||||
}
|
}
|
||||||
case IDRETRY: // Break into the debugger then return control to caller
|
case IDRETRY:
|
||||||
{
|
{
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case IDIGNORE: // Return control to caller
|
case IDIGNORE:
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
default: // This should not happen; treat as fatal error:
|
default:
|
||||||
{
|
{
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
@ -157,7 +143,7 @@ inline void assertFuncInternal(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#else //linux or others
|
#else
|
||||||
|
|
||||||
inline void assertFuncProduction(
|
inline void assertFuncProduction(
|
||||||
const char *expression,
|
const char *expression,
|
||||||
|
|
Loading…
Reference in New Issue