Ignore:
Timestamp:
Aug 20, 2016, 7:04:17 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
80722d0
Parents:
8b7ee09
git-author:
Peter A. Buhr <pabuhr@…> (08/20/16 13:18:07)
git-committer:
Peter A. Buhr <pabuhr@…> (08/20/16 19:04:17)
Message:

abort on assert rather than exit, print backtrace on cfa-cpp errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/Assert.cc

    r8b7ee09 re6955b1  
    1010// Created On       : Thu Aug 18 13:26:59 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 18 23:40:29 2016
    13 // Update Count     : 8
     12// Last Modified On : Fri Aug 19 17:07:08 2016
     13// Update Count     : 10
    1414//
    1515
    1616#include <assert.h>
    17 #include <cstdarg>
    18 #include <cstdio>
    19 #include <cstdlib>
     17#include <cstdarg>                                                                              // varargs
     18#include <cstdio>                                                                               // fprintf
     19#include <cstdlib>                                                                              // abort
    2020
    2121extern const char * __progname;                                                 // global name of running executable (argv[0])
     
    2626void __assert_fail( const char *assertion, const char *file, unsigned int line, const char *function ) {
    2727        fprintf( stderr, CFA_ASSERT_FMT ".\n", __progname, function, line, file );
    28         exit( EXIT_FAILURE );
     28        abort();
    2929}
    3030
     
    3535        va_start( args, fmt );
    3636        vfprintf( stderr, fmt, args );
    37         exit( EXIT_FAILURE );
     37        abort();
    3838}
    3939
Note: See TracChangeset for help on using the changeset viewer.