Eli5 When applications crash, why do they provide an obscure error code instead of a small description of what the issue actually is?

584 views

Eli5 When applications crash, why do they provide an obscure error code instead of a small description of what the issue actually is?

In: Technology

8 Answers

Anonymous 0 Comments

A husband and wife are packing for a trip. The husband goes into the bathroom to pack his toiletries and the wife asks him to grab hers too while he’s in there. Now consider these two possible scenarios:

1. While the husband is gathering everything, he accidentally drops her toothbrush into the toilet.
2. When he arrives in the bathroom, he finds her toothbrush already in the toilet.

In both cases, he has to report back to his wife that her toothbrush is in the toilet and that she’ll need a new one. In the first scenario, the husband knows exactly how it got there so he can fully describe what went wrong and he can probably figure out what to do next time so it doesn’t happen again.

But in the second scenario, the toothbrush was already in the toilet so he doesn’t know exactly what happened. All he knows is that *something* happened and the toothbrush being in the toilet was the end result. A google search suggests that a child or pet is likely responsible for it getting there, but that’s just the most common reason other people have identified for why their toothbrush is in the toilet. There’s no guarantee that that’s what happened to this toothbrush.

Error codes in software are much the same. Often times, the program only knows about the final state that includes the error, but doesn’t know enough about how it got into that state to provide an accurate description of what happened to the user. The error codes are designed to describe that error state and the people can take that (and sometimes other diagnostic information, such as logs) and reverse engineer what happened. They then share the root causes online so the next time someone googles that error code, they can see a list of previous known causes and try those solutions first. But there’s never any guarantee that the solutions Google finds will work for any given instance of an error code because every instance is different.

You are viewing 1 out of 8 answers, click here to view all answers.