#192 closed defect (fixed)

Can't catch exception raised by default resumption handler of another exception

Reported by: mlbrooks Owned by:
Priority: major Component: cfa-cc
Version: 1.0 Keywords:
Cc:

Description

#include <exception.hfa>

TRIVIAL_EXCEPTION( A );
TRIVIAL_EXCEPTION( B );

void defaultResumptionHandler( B & ) {
    printf("DRH B\n");
}

void defaultResumptionHandler( A & ) {
    printf("DRH A\n");
    throwResume (B){};
}

int main() {
    try {    
        throwResume (A){};
    } catchResume (B *) {
        printf("caught B\n");
    }
}

Expect

DRH A
caught B

Actual

DRH A
DRH B

Change History (1)

comment:1 Changed 11 months ago by ajbeach

Resolution: fixed
Status: newclosed

Fixed!

Technically if one considered the default handler to happen during the search but that is less useful and not consistent with termination.

Note: See TracTickets for help on using tickets.