begin to write a space-optimised error_code