Pass codeinfo to gen_exit