Enable crash report tool in debugging sample application

This commit is contained in:
kaetemi 2015-03-06 19:06:10 +01:00
parent c369464776
commit ea5a53ddc4

View file

@ -18,9 +18,7 @@
#include <stdlib.h>
// contains all debug features
#include "nel/misc/debug.h"
using namespace NLMISC;
#include <nel/misc/debug.h>
int main(int /* argc */, char ** /* argv */)
{
@ -36,7 +34,10 @@ int main (int /* argc */, char ** /* argv */)
// in release mode, this function does nothing by default. you have to add a displayer
// manually, or put true in the parameter to say to the function that you want it to
// add the default displayers
createDebug ();
NLMISC::createDebug();
// enable the crash report tool
NLMISC::INelContext::getInstance().setWindowedApplication(true);
// display debug information, that will be skipped in release mode.
nldebug("nldebug() %d", 1);
@ -63,7 +64,7 @@ int main (int /* argc */, char ** /* argv */)
{
nlerror("nlerror() %d", 4);
}
catch(const EFatalError &)
catch (const NLMISC::EFatalError &)
{
// just continue...
nlinfo("nlerror() generated an EFatalError exception, just ignore it");