Why do software engineers use error codes to describe issues instead of saying what is wrong?

Error codes report on the specific fault or symptom, not “what is wrong”.
An error code that translates to “Couldn’t connect to server” for example, means that for some reason the program couldn’t connect.
What exactly is wrong in that scenario? It could be that your internet connection is down, the server is down, both are down, you turned off your wifi antenna, there’s a memory leak in the program’s net code, the net code is poorly written, and many, many more possibilities.
So often, the error will be accompanied by common “what is wrong” causes of the error code “Check your internet connection, check your firewall, server busy/try again later, etc.”
Some of this comes from the early days of computers, when they had very limited memory. There wasn’t room for full error messages, so a number code was used which people could look up in a reference manual if necessary.

Leave a Reply

Your email address will not be published. Required fields are marked *