Assert
This function is a shorthand way of performing a test and displaying an error. If the specified condition is not true, a call to Debug::Stop() will be made.
Syntax
- static void Assert(bool condition, const std::string& errortext="Assert failed.")
Parameters
- condition: if this condition is not true, a call to Debug::Error() will be made.
- errortext: the text that will be displayed is the condition is false.
Example
#include "Leadwerks.h"
using namespace Leadwerks;
int main(int argc, const char *argv[])
{
Debug::Assert(1==2,"This is an error!");
}