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
Branches
Tags
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 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -36,7 +36,7 @@ extern Context_T CTX; ...@@ -36,7 +36,7 @@ extern Context_T CTX;
void Debug() void Debug()
{ {
printf("debug!\n"); printf("oops!\n");
} }
void Msg(int level, const char *fmt, ...) void Msg(int level, const char *fmt, ...)
...@@ -180,11 +180,10 @@ void Exit(int level) ...@@ -180,11 +180,10 @@ void Exit(int level)
UnlinkFile(CTX.tmp_filename_fullpath); UnlinkFile(CTX.tmp_filename_fullpath);
if(level){ if(level){
// in case of an abnormal exit, force the abort directly // abnormal program termination: exit directly (we used to call
// (bypassing any post main stuff, e.g. destructors for static // abort() to flush open streams, but it behaves in weird ways
// variables). This still guarantees that any open streams are // e.g. on Mac... so just exit!
// flushed and closed, but can prevent nasty infinite loops. exit(level);
abort();
} }
// if we exit cleanly (level==0) and we are in full GUI mode, save // 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.
Please register or to comment