Fix handling of CATCH() or FAIL() macros around functions that should return an (akerr_ErrorContext *) but return an invalid pointer (to something not in our exception array)
This commit is contained in:
22
tests/err_improper_closure.c
Normal file
22
tests/err_improper_closure.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "akerror.h"
|
||||
#include <stdio.h>
|
||||
|
||||
akerr_ErrorContext AKERR_NOIGNORE *improper_closure(void)
|
||||
{
|
||||
PREPARE_ERROR(errctx);
|
||||
ATTEMPT {
|
||||
} CLEANUP {
|
||||
} PROCESS(errctx) {
|
||||
} FINISH(errctx, true);
|
||||
fprintf(stderr, "Improperly returning from improper_closure\n");
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
PREPARE_ERROR(errctx);
|
||||
ATTEMPT {
|
||||
CATCH(errctx, improper_closure());
|
||||
} CLEANUP {
|
||||
} PROCESS(errctx) {
|
||||
} FINISH_NORETURN(errctx);
|
||||
}
|
||||
Reference in New Issue
Block a user