Bug 39191 - Add a `format` param to Koha::Exceptions::ArticleRequest::WrongFormat
Summary: Add a `format` param to Koha::Exceptions::ArticleRequest::WrongFormat
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on: 36081
Blocks:
  Show dependency treegraph
 
Reported: 2025-02-24 17:27 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2025-04-23 07:43 UTC (History)
2 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 39191: Add `format` parameter to Koha::Exceptions::ArticleRequest::WrongFormat (2.84 KB, patch)
2025-02-24 17:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 39191: Add `format` parameter to Koha::Exceptions::ArticleRequest::WrongFormat (2.91 KB, patch)
2025-04-02 14:12 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi (tcohen) 2025-02-24 17:27:16 UTC
It would be handy if the exception carried the 'wrong format passed' which happens to be available in the context the exception is thrown.
Comment 1 Tomás Cohen Arazi (tcohen) 2025-02-24 17:39:37 UTC
Created attachment 178616 [details] [review]
Bug 39191: Add `format` parameter to Koha::Exceptions::ArticleRequest::WrongFormat

This patch just adds a new parameter so any exception consumer or even
the logs contain more information about the context in which the
exception was thrown. This would be useful debugging issues.

No behavior change in Koha.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/ArticleRequest.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 2
=> SUCCESS: Tests pass!
4. Sign off :-D
Comment 2 Martin Renvoize (ashimema) 2025-04-02 14:12:36 UTC
Created attachment 180397 [details] [review]
Bug 39191: Add `format` parameter to Koha::Exceptions::ArticleRequest::WrongFormat

This patch just adds a new parameter so any exception consumer or even
the logs contain more information about the context in which the
exception was thrown. This would be useful debugging issues.

No behavior change in Koha.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/ArticleRequest.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 2
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 3 Martin Renvoize (ashimema) 2025-04-02 14:13:12 UTC
Trivial, clear improvement.. works as expected.

Passing QA
Comment 4 Katrin Fischer 2025-04-23 07:43:01 UTC
Pushed for 25.05!

Well done everyone, thank you!