Bug 39191

Summary: Add a `format` param to Koha::Exceptions::ArticleRequest::WrongFormat
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 36081    
Bug Blocks:    
Attachments: Bug 39191: Add `format` parameter to Koha::Exceptions::ArticleRequest::WrongFormat

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