Adds initial ErrorCodes file
Exports ErrorCodes in ORM
Changes many errors to use the ErrorCodes generator (#206)