Compute scope inside exception handlers