def METHOD_NAME(self, mocked_exec):
    mocked_exec.side_effect = Exception
    err = batchprocessors.BATCHCODE.code_exec(
        '# batchcode code:\n\nprint("Hello")\nprint("Evennia")', extra_environ={}
    )
    self.assertIsNotNone(err)