Error messaging (OpenInsight Specific)
At 16 DEC 1998 10:29:31PM James Birnie wrote:
At present, all of our error messaging gets sent to a generic routine. A flag is passed which defines if the message is "fatal" and if so is written to a log file, and the user is given an option to print it.
The problem is, they are non-standard. For the same error eg. failure to write, we customise the whole string to the log file and so all of us have different ways of expressing ourselves to the user eg. "System Error….", "Fatal Error, Unable to write..", "Headbutt System and Go Home…" etc.
An errorcode table would fix this, and I'd be interested in any ideas in this area, of hour people have implemented them.
Currently we write the @STATION, SESSION.DETAILS, PASSED.MSG and USER where appropriate.
Recording the current routine would be great! RETSTACK() "seems" to keep the correct heirarchy of the routines, as the calling routine is sofar always RETSTACK() and so on.(RETSTACK being our error message routine).
Questions:
1. Are my assumptions about the retstack correct?
2. What is the best way to determine a fatal error code (@FILE_ERROR?)
3. OI generates good error messages of its own which are sent to any RECEIVER field - can this message be determined programatically? eg. on failure to open a file.
TIA for any thoughts, tips.
James.
At 20 DEC 1998 07:20AM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura, Inc.[/url] wrote:
Your assumptions are correct about retstack, assuming you want to know the program that called the error routine program.
Items to check are @FILE.ERROR, STATUS() and Get_Status().
You should be able to get the system receiver property and then view the contents with another get_property.
akaplan@sprezzatura.com
At 20 DEC 1998 07:38PM James Birnie wrote:
Thanks Aaron.
Do I have to use the receiver property with an editbox, or can I return the OI error message programatically.
TIA,
James.
At 24 DEC 1998 09:34AM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura, Inc.[/url] wrote:
If you set the receiver, then the message will automatically show up there. If not, you'll have to get the text of the message from the current receiver and display it in the mode you wish.
akaplan@sprezzatura.com