9.1 Assert

Assert is a macro which takes an assertion and an exception argument. When the given assertion fails the given exception is thrown.


Synopsis


  #include <lyric/Assert.hpp>
  
  #define Assert(ASSERTION,EXCEPTION)


Description


Assert(ASSERTION,EXCEPTION)
If the given ASSERTION is false, the given EXCEPTION is thrown. An exception trace message is writen to the console with the prefix [EXCEPTION] and the address of the object which made the assertion. This enables exception tracing and helps debugging.