[Koha-bugs] [Bug 25032] Generic unhandled exception handling
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Apr 15 11:17:13 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25032
--- Comment #25 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 102974
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102974&action=edit
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 at bugs.koha-community.org>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list