Hello,
I conscientiously follow the advice of programmers I trust and avoid incorporating errors as part of application logic. I have a generalized error handler whose main purpose is to record the error to the errors table, and I treat that error as a flaw in "error prevention" and modify my code accordingly.
However, with increasing frequency, I find myself in a position where I throw an "Unknown error occured. Nothing to do." kind of message to the user. These are very rare, but when they happen, valuable info pertaining to the logical flaws of my application are lost. I would like to raise custom errors with designated numbers whose custom descriptions would be looked up from a table. I believe err.raise method is the way to go, but I'm confused after reading its documentation. My current errors table, which is entirely filled with system errors, has records with err.number outside the range of 0-65535. And there are also records whose numbers are between 513-65535, which is a range that is said to be reserved for custom errors.
My programming skills are not enough for creating my custom objects, so if I am in a class module, that class module belongs to an access form or report.
How do you handle this problem?
I conscientiously follow the advice of programmers I trust and avoid incorporating errors as part of application logic. I have a generalized error handler whose main purpose is to record the error to the errors table, and I treat that error as a flaw in "error prevention" and modify my code accordingly.
However, with increasing frequency, I find myself in a position where I throw an "Unknown error occured. Nothing to do." kind of message to the user. These are very rare, but when they happen, valuable info pertaining to the logical flaws of my application are lost. I would like to raise custom errors with designated numbers whose custom descriptions would be looked up from a table. I believe err.raise method is the way to go, but I'm confused after reading its documentation. My current errors table, which is entirely filled with system errors, has records with err.number outside the range of 0-65535. And there are also records whose numbers are between 513-65535, which is a range that is said to be reserved for custom errors.
My programming skills are not enough for creating my custom objects, so if I am in a class module, that class module belongs to an access form or report.
How do you handle this problem?