]> git.koha-community.org Git - koha.git/commit
Bug 26555: Add ->messages and ->add_message to Koha::Object
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 28 Sep 2020 13:49:24 +0000 (10:49 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 15 Oct 2020 12:50:06 +0000 (14:50 +0200)
commitd576f887c1a0451d45eb0cda055f974916f011c7
tree50019e610a53df3d349e1ba8dfa99c46beb1b177
parentaa69ef69722af8c9a2b9afd780b8f1ff68c32a9b
Bug 26555: Add ->messages and ->add_message to Koha::Object

This patch adds a way to make Koha::Object-derived classes to carry
messages around. This targets non-fatal errors, or around action flags
for the caller, to avoid complex exception handling on the controllers when
it is not expected to be fatal.

To test:
1. Apply this patchset
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Object.pm
t/db_dependent/Koha/Object.t