Enable crash report tool in debugging sample application

--HG--
branch : feature-crashreport
This commit is contained in:
kaetemi 2015-03-06 19:06:10 +01:00
parent 74cb91d460
commit 9d50210e6b

View file

@ -18,9 +18,7 @@
#include <stdlib.h> #include <stdlib.h>
// contains all debug features // contains all debug features
#include "nel/misc/debug.h" #include <nel/misc/debug.h>
using namespace NLMISC;
int main(int /* argc */, char ** /* argv */) 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 // 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 // manually, or put true in the parameter to say to the function that you want it to
// add the default displayers // 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. // display debug information, that will be skipped in release mode.
nldebug("nldebug() %d", 1); nldebug("nldebug() %d", 1);
@ -63,7 +64,7 @@ int main (int /* argc */, char ** /* argv */)
{ {
nlerror("nlerror() %d", 4); nlerror("nlerror() %d", 4);
} }
catch(const EFatalError &) catch (const NLMISC::EFatalError &)
{ {
// just continue... // just continue...
nlinfo("nlerror() generated an EFatalError exception, just ignore it"); nlinfo("nlerror() generated an EFatalError exception, just ignore it");