[Koha-bugs] [Bug 26555] Add a way for Koha::Object(s) to carry execution information

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Oct 12 13:01:23 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26555

--- Comment #24 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
(In reply to Jonathan Druart from comment #23)
> (In reply to Marcel de Rooy from comment #22)
> > (In reply to Tomás Cohen Arazi from comment #3)
> > > Jonathan pointed that this situation could be confusing:
> > > 
> > >     $o->bad_call
> > >     $o->errors; # error is set
> > >     $o->good_call
> > >     $o->errors; # error is still set
> > 
> > What did we do here now? Nothing yet.
> > Should we clear the array on calling ->errors ?
> 
> Then:
>   $o->bad_call
>   $o->good_call
>   $o->errors; # error is set!

It's no longer 'errors' but 'messages'; We're not trying to catch "errors" but
rather convey informational messages down the stack. For hard-stop errors we
should continue to throw exceptions.  I don't think we should reset the
'messages' content personally.. you can always grab a fresh object if you wish
to do so.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list