Not the same old error handling question
I have read a lot of good information on error handling here but there is one thing that I have not seen any information on and that is error constants and or ID's
What is the best way to keep track of your error numbers and descriptions?
From what I can gather the following information should be logged and presented back to the user some how.
Constant: ERR_SLP_MISC_DIS_DOCB
ID: 512
Module: Misc_DB
Function: Disconnect
Type: General (or Warning, or Fatal)
Description: Cannot disconnect from Database.
I was going to setup a separate string table with all of my error descriptions starting with an ID of 512. I was also going to add an error code module that would have constants listed for each error and then use the combination of the two to raise my errors in my code.
Could I please have some insights, comments or webs sites that could steer in the right directions on how errors are handled in an enterprise application.
Thank You