mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 23:23:04 +01:00
Cleanup SUPERCLIENT - use other logic to decide where should assert message go
This commit is contained in:
parent
1bcc855353
commit
b3d99a010e
@ -28,24 +28,22 @@
|
||||
#include <stdlib.h> // abort()
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef WIN_NT
|
||||
#include <io.h> // isatty()
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h> // isatty()
|
||||
#endif
|
||||
|
||||
#define FB_ASSERT_FAILURE_STRING "Assertion (%s) failure: %s %"LINEFORMAT"\n"
|
||||
|
||||
#ifdef SUPERCLIENT
|
||||
|
||||
#if !defined(fb_assert)
|
||||
#define fb_assert(ex) {if (!(ex)) {fprintf(stderr, FB_ASSERT_FAILURE_STRING, #ex, __FILE__, __LINE__); abort();}}
|
||||
#define fb_assert_continue(ex) {if (!(ex)) {fprintf(stderr, FB_ASSERT_FAILURE_STRING, #ex, __FILE__, __LINE__);}}
|
||||
#define fb_assert_continue(ex) {if (!(ex)) {if (isatty(2)) fprintf(stderr, FB_ASSERT_FAILURE_STRING, #ex, __FILE__, __LINE__);\
|
||||
else gds__log(FB_ASSERT_FAILURE_STRING, #ex, __FILE__, __LINE__);}}
|
||||
#define fb_assert(ex) {if (!(ex)) {if (isatty(2)) fprintf(stderr, FB_ASSERT_FAILURE_STRING, #ex, __FILE__, __LINE__);\
|
||||
else gds__log(FB_ASSERT_FAILURE_STRING, #ex, __FILE__, __LINE__); abort();}}
|
||||
#endif
|
||||
|
||||
#else // !SUPERCLIENT
|
||||
|
||||
#if !defined(fb_assert)
|
||||
#define fb_assert(ex) {if (!(ex)) {gds__log(FB_ASSERT_FAILURE_STRING, #ex, __FILE__, __LINE__); abort();}}
|
||||
#define fb_assert_continue(ex) {if (!(ex)) {gds__log(FB_ASSERT_FAILURE_STRING, #ex, __FILE__, __LINE__);}}
|
||||
#endif
|
||||
|
||||
#endif // SUPERCLIENT
|
||||
|
||||
#else // DEV_BUILD
|
||||
|
||||
#define fb_assert(ex) // nothing
|
||||
|
Loading…
Reference in New Issue
Block a user