def eh_check(self, builder):
        """Check if an exception is raised
        """
        ctx = self._context
        cc = ctx.call_conv
        # Inspect the excinfo argument on the function
        trystatus = cc.check_try_status(builder)
        excinfo = trystatus.excinfo
        has_raised = builder.not_(cgutils.is_null(builder, excinfo))
        if PYVERSION < (3, 11):
            with builder.if_then(has_raised):
                self.eh_end_try(builder)
        return has_raised
Check if an exception is raised
        
numba/core/runtime/context.py