This moves the error initialization to the module it gets raised in.
Looks like this was left around from a refactor.