yasmine
y_assert.hpp
Go to the documentation of this file.
1 // //
3 // This file is part of the Seadex yasmine ecosystem (http://yasmine.seadex.de). //
4 // Copyright (C) 2016-2017 Seadex GmbH //
5 // //
6 // Licensing information is available in the folder "license" which is part of this distribution. //
7 // The same information is available on the www @ http://yasmine.seadex.de/Licenses.html. //
8 // //
10 
11 
12 #ifndef Y_ASSERT_99E5ACCD_95C4_419D_A257_7294D6692569
13 #define Y_ASSERT_99E5ACCD_95C4_419D_A257_7294D6692569
14 
15 
16 #define Y_ASSERT( _condition, _message ) \
17  do \
18  { \
19  if( !( _condition ) ) \
20  { \
21  SX_LOG_AND_WAIT( hermes::log_level::LL_ASSERT, "Assert failed! Message: '%', Condition '%'", _message, #_condition ); \
22  assert( ( _condition ) && _message ); \
23  } \
24  } \
25  while( 0 )
26 
27 #include "hermes/log.hpp"
28 
29 
30 #endif