top | item 18989932

(no title)

lost_my_pwd | 7 years ago

Humans are not always the consumer of error output. Distinct error codes simplify parsing and eliminate ambiguity.

It also makes it easier for developers look up a specific error in the documentation, assuming it's been documented.

discuss

order

dmix|7 years ago

It's also easier for a (technical) user to reference they got error 1018 than copy & paste "An index signature parameter cannot have an accessibility modifier." Especially in titles and when referencing it multiple times within a body of text.

talltimtom|7 years ago

How does an error code make it easier to look up an error? The workflow is either “get error, google it”, or “get errorcode google it”. In both cases the docs will be the top hit.

If we where talking 20 years ago I might agree, but I really can’t see the argument with todays tooling.

simion314|7 years ago

Updates can improve on the error messages, making them more clear, the error code does not change but the message changes.

Also many times the error message is interpolated with your specific details like

"Syntax error at line 123 in file /home/user/myfile , symbol X is not allowed here" this is a silly example but often enough when i google this errors I have to first strip out my data from them.

gbear605|7 years ago

Googling the text of an error often finds lots of unrelated results. So no, the docs might not be the top hit.

debaserab2|7 years ago

All errors are google-able?