Bugzilla – Attachment 62410 Details for
Bug 17502
Add type check to output_pref and use exceptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17502: Add info when throwing the exception
Bug-17502-Add-info-when-throwing-the-exception.patch (text/plain), 985 bytes, created by
Jonathan Druart
on 2017-04-19 18:35:10 UTC
(
hide
)
Description:
Bug 17502: Add info when throwing the exception
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-04-19 18:35:10 UTC
Size:
985 bytes
patch
obsolete
>From 34e250c7144adfaa0ef184a454434dca31fd01f2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 19 Apr 2017 15:34:17 -0300 >Subject: [PATCH] Bug 17502: Add info when throwing the exception > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > Koha/DateUtils.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/DateUtils.pm b/Koha/DateUtils.pm >index 66ad264..af5ce7e 100644 >--- a/Koha/DateUtils.pm >+++ b/Koha/DateUtils.pm >@@ -218,7 +218,7 @@ sub output_pref { > } > > return if !defined $dt; # NULL date >- Koha::Exceptions::WrongParameter->throw( 'dt is not a datetime' ) if ref($dt) ne 'DateTime'; >+ Koha::Exceptions::WrongParameter->throw( "output_pref is called with '$dt' (ref ". ( ref($dt) ? ref($dt):'SCALAR')."), not a DateTime object") if ref($dt) ne 'DateTime'; > > # FIXME: see bug 13242 => no TZ for dates 'infinite' > if ( $dt->ymd !~ /^9999/ ) { >-- >2.9.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17502
:
56916
|
56917
|
57597
|
61458
|
61510
|
61518
|
61519
|
62168
|
62169
|
62408
|
62409
| 62410