I think it is a good practice to initialize `*exc = NULL` at the beginning of these functions.