Hi Brian, 

the way I read the explanation of 2.2 the only attributes currently
supported are catch and throw. I think their purpose is to provide
functions with a more informative way of handling errors:

If I try the function without catch and throw, then the reported error is
not associated with the name of the function:

>> wo-my-func -3
                       ** User Error: only positive integers.
                                              ** Where: make error! "only
positive integers"
negate arg
                       

If I had a hierarchy of function calls which eventually calls wo-my-func
with a negative value I'd probably have to search through all the functions
until I'd find the one responsible for the error. 

In contrast, using the new catch/throw combination, I get the following,
more informative response:

>> my-func -3
** User Error: only positive integers.
                       ** Where: my-func -3                     

Here the name of the function in whose body the error occured is reported
as part of the error message. Makes it easier to find the source of an
error (or something else).


;- Elan


Reply via email to