Changeset a424315d


Ignore:
Timestamp:
Feb 7, 2018, 9:14:37 AM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
695571c
Parents:
53217c1
Message:

update error messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/interpose.c

    r53217c1 ra424315d  
    1010// Created On       : Wed Mar 29 16:10:31 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Feb  6 17:57:56 2018
    13 // Update Count     : 49
     12// Last Modified On : Wed Feb  7 09:05:18 2018
     13// Update Count     : 59
    1414//
    1515
     
    215215
    216216void sigHandler_segv( __CFA_SIGPARMS__ ) {
    217         abortf( "Attempt to address location %p\n"
     217        abortf( "Addressing invalid memory at location %p\n"
    218218                        "Possible cause is reading outside the address space or writing to a protected area within the address space with an invalid pointer or subscript.\n",
    219219                        sfp->si_addr );
     
    221221
    222222void sigHandler_ill( __CFA_SIGPARMS__ ) {
    223         abortf( "Attempt to execute code at location %p.\n"
     223        abortf( "Executing illegal instruction at location %p.\n"
    224224                        "Possible cause is stack corruption.\n",
    225225                        sfp->si_addr );
     
    229229        const char * msg;
    230230
    231         switch ( sfp->si_code ) {
    232           case FPE_INTDIV:
    233           case FPE_FLTDIV: msg = "divide by zero"; break;
    234           case FPE_FLTOVF: msg = "overflow"; break;
    235           case FPE_FLTUND: msg = "underflow"; break;
    236           case FPE_FLTRES: msg = "inexact result"; break;
    237           case FPE_FLTINV: msg = "invalid operation"; break;
     231        choose( sfp->si_code ) {
     232          case FPE_INTDIV, FPE_FLTDIV: msg = "divide by zero";
     233          case FPE_FLTOVF: msg = "overflow";
     234          case FPE_FLTUND: msg = "underflow";
     235          case FPE_FLTRES: msg = "inexact result";
     236          case FPE_FLTINV: msg = "invalid operation";
    238237          default: msg = "unknown";
    239         } // switch
    240         abortf( "Floating point error.\n"
    241                         "Cause is %s.\n", msg );
     238        } // choose
     239        abortf( "Computation error %s at location %p.\n", msg, sfp->si_addr );
    242240}
    243241
Note: See TracChangeset for help on using the changeset viewer.