Move EnumErrorCode back out of the API, replace with IErrorState interface that EnumErrorCode implements.
The benefit of this being that we no longer have to break the API to add new error states and in theory, addons can add their own error states now.
This might be a breaking change or it might not be. Hard to say.