RE: Proposal: Wiki-based Exception Descriptions

"Mark Hahn" <[email protected]> Thu, 15 Jul 2004 11:25:16 -0700
Newsgroups gmane.comp.lang.prothon.user
Message-ID <000a01c46a99$13ab4af0$0b01a8c0@mark>
Paul Prescod wrote:

> In GUI systems it is common to link error messages to "Help" buttons 
> that describe when the error is likely to occur. In batch 
> systems like 
> Prothon, it is appropriate to use URLs for this task. I propose that 
> Prothon exception messages be of the form:
> 
> Type Error, read attempt on a property with no get_ method.
> See http://www.prothon.org/errors/no_get_method
> 
> This page could be a wiki maintained by the Prothon community. Users 
> could even use it to post examples of problems they have and Prothon 
> experts could explain why they happened. Over time the page 
> would become 
> a pretty definitive explanation of the likely causes for a particular 
> error. We can also use the information we collect on the page 
> to subtype 
> exceptions and make them more precise.

This was proposed several time by serge, but the examples he gave we
always ones that were impossible.  There was never enough information to
go to a meaningful URL.  The only way to implement this would been to
have implement "try exception" at every level of the code which is
inefficient and impractical.

http://www.prothon.org/pipermail/prothon-user/2004-May/001632.html
http://www.prothon.org/pipermail/prothon-user/2004-June/001774.html

In other words, you can rarely say more than the exception says.  In his
case the exception said "method not found".  He wanted it to say more
about his particular context but the URL could have only said "When the
attribute was searched in the prototype chain for the method, the method
was not located.".

This is a common phenomenum when looking up an error code in a reference
manual.  It usually says no more than the text version of the error.

Now if you are asking for Prothon to put "try except" code at every
single function call so there can be more meaningful messages, this will
have to be discussed.