[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Mac::Glue error handlers



At 20:44 -0800 2000.11.19, John W Baxter wrote:
>At 20:34 -0500 11/19/00, Chris Nandor wrote:
>>At 0:35 +0100 2000.11.20, Bart Lateur wrote:
>>>On Sun, 19 Nov 2000 11:05:41 -0500, Chris Nandor wrote:
>>>>I think this would make it better.  Thoughts?  The big problem I have here
>>>>is changing the public interface, especially since we are already at a 1.00
>>>>release.
>>>
>>>Your function can accept both. It is pretty common in functions in
>>>modules, to check the type of arguments argument, and act accordingly.
>>
>>This is a question of what a user-supplied error handler will get as its
>>arguments.  I cannot pass both forms of arguments to that handler, only
>>one.  :)
>>
>
>That would seem to suggest a different module, or a differently-named
>function of the one module...with the old way included but deprecated, and
>going away soon enough for Chris to keep his sanity.  Sounds like a lot of
>extra work for Chris, unfortunately.

Well, that is why I am hoping people who actually use the error handling
speak up.  The error handling was only added on September 12 with the 1.00
release.  I've not known of many people using it, and the fix for it is
very simple (I could provide 2-3 lines of code anyone could paste in to
port their existing scripts).  So I don't think it would be a big deal to
change it at this point, but it's basically now or never.

So anyone who uses the error handling (the new error handling as of 1.00),
speak up now.  :D

Just as a recap for those who haven't used it, it is enabled like this:

  my $glue = new Mac::Glue 'App';
  $glue->ERRORS(\&error_handler);

Or per-event:

  $glue->some_event($value1, param2 => $value2, ERRORS => \&error_handler);

So it just means changing, or adding a couple lines to, the error handler.

Thanks,

-- 
Chris Nandor                      pudge@pobox.com    http://pudge.net/
Open Source Development Network    pudge@osdn.com     http://osdn.com/

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org