See below

On 2/11/06, Jim Self <[EMAIL PROTECTED]> wrote:
> Kevin,
> What do you want to happen when the error is detected?

I would want the function to have a chance to return a 'failure' value.


> Your third example would give a syntax error. I would expect this to be a 
> programming
> error.

Not really.  In my debugger program, I have the ability, while
stepping through the program, to dump out arrays.  My array-display
function takes a variable name (similar to the pRef in my example).

It has been working well, until I accidentally passed it an invalid reference.


In my work, it seems that the standard error response of logging the error and
> halting (or dropping back to the MUMPS shell) is generally the best way to 
> handle these
> kinds of errors, unless you can catch them much earlier (composition rather 
> than use of
> the construct).
>
> If pRef is expected to be a literal global reference then a function to check 
> its syntax
> would be pretty easy to write.
>

In my case, it is supposed to be anything the user wants it to be, and
it is the job of the function to screen out erroneous input.

Thanks
Kevin


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to