Koha-clms/Koha/REST/Plugin
Tomas Cohen Arazi 5d36a311fe
Bug 25032: Chomp stringified exception
If we catch a Koha::Exception-derived exception, the log is put in a
single line. If the code 'dies' then a newline character is appended to
the string. This patch chomps it so it displays in a single line.

To test:
1. Tweak Koha::REST::V1::Cities::list in the try block so it dies before
   render
2. Restart plack and try the original test plan
=> FAIL: Notice two lines are logged
3. Apply this patch
4. Repeat 2
=> SUCCESS: Only one line in the logs
5. Verify rendering a Koha::Exception works as well:
   Koha::Exceptions::Exception->throw("Nada!");

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-29 16:24:24 +01:00
..
Exceptions.pm Bug 25032: Chomp stringified exception 2020-04-29 16:24:24 +01:00
Objects.pm Bug 24502: object.search also filter by prefetched columns 2020-03-03 09:16:55 +00:00
Pagination.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
PluginRoutes.pm Bug 25131: (QA follow-up) Move test for needs_install outside the plugin 2020-04-16 19:21:19 +01:00
Query.pm Bug 24830: Fix parse_prefetch recursion and +count cases 2020-03-20 15:18:40 +00:00