Skip to content
Snippets Groups Projects
Commit 7d17268c authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

don't use abort(), it's really annoying (on Mac it triggers the system "submit

a crash report, blabla..." dialog)
parent 0ae334a4
No related branches found
No related tags found
No related merge requests found
// $Id: Message.cpp,v 1.90 2008-04-11 09:55:48 geuzaine Exp $
// $Id: Message.cpp,v 1.91 2008-04-16 15:49:35 geuzaine Exp $
//
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
......@@ -36,7 +36,7 @@ extern Context_T CTX;
void Debug()
{
printf("debug!\n");
printf("oops!\n");
}
void Msg(int level, const char *fmt, ...)
......@@ -180,11 +180,10 @@ void Exit(int level)
UnlinkFile(CTX.tmp_filename_fullpath);
if(level){
// in case of an abnormal exit, force the abort directly
// (bypassing any post main stuff, e.g. destructors for static
// variables). This still guarantees that any open streams are
// flushed and closed, but can prevent nasty infinite loops.
abort();
// abnormal program termination: exit directly (we used to call
// abort() to flush open streams, but it behaves in weird ways
// e.g. on Mac... so just exit!
exit(level);
}
// if we exit cleanly (level==0) and we are in full GUI mode, save
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment