Returns an error instead of an exception when trying to emit an invalid code point