Add support for --enable-error-code and --disable-error-code (#9172)
Add ability to enable error codes globally from the command line
Add ability to disable error codes globally from the command line
Enabling error codes will always override disabling error codes
Update documentation to include new flags
Fixes #8975.