code generation for errors and error access