Bug 39191 - Add a `format` param to Koha::Exceptions::ArticleRequest::WrongFormat
Summary: Add a `format` param to Koha::Exceptions::ArticleRequest::WrongFormat
Status: Needs Signoff
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: Testopia
URL:
Keywords:
Depends on: 36081
Blocks:
  Show dependency treegraph
 
Reported: 2025-02-24 17:27 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2025-02-24 17:39 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
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

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