Fix invalid raises in Code
Merge pull request #1789 from fishcakez/fix/code_raise_error

Fix invalid raises in Code