Hm, you pass in `code`, but you never use it.

Method name is also slightly misleading to me - it actually throws an exception and doesn't do any parsing.