rising_coder
rising_coder

Reputation: 11

Is it ok to have all Error codes and Messages in a XML file and use that file in the code to Log?

Is it ok to have all Error codes and Messages in a XML file and use that file in the code to Log ??

In this link, in ticked answer he clearly mentioned "Keep a list of all error codes, but don't do this in your code. ". I want to know why

Upvotes: 0

Views: 42

Answers (1)

Fildor
Fildor

Reputation: 16128

Is it ok to have all Error codes and Messages in a XML file and use that file in the code to Log ??

Why shouldn't it?

Keep a list of all error codes, but don't do this in your code. Keep a short list on a wiki-page for developers, which they can easily edit when they need a new code. The help desk should have a separate list on their own wiki.

Now, that's a different story. People should not need the source code to look up the error codes.

Separating the lookup reference lists for help desk and development is yet another story: Development of course needs "bleeding edge" info. But the list will be somewhat volatile. Help desk will need the "snapshot" list of possible codes for a specific version of the product.

Upvotes: 1

Related Questions