こういうの考えたんだけどどうだろう?
実用性無いだろうか

#include <stdio.h>

typedef void (*exception_handler)(void);

void register_exception_handler(exception_handler handler)
{
handler();
}

void exception_occurred()
{
printf("例外が発生しました。\n");
}

void may_throw_exception(int condition)
{
if (condition) {
register_exception_handler(exception_occurred);
}
}

int main()
{
may_throw_exception(1);

return 0;
}