Bugzilla – Attachment 52131 Details for
Bug 16684
Add advanced error reporting for .perl files in atomicupdates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16684 - Add advanced error reporting for .perl files in atomicupdates
Bug-16684---Add-advanced-error-reporting-for-perl-.patch (text/plain), 1.28 KB, created by
Kyle M Hall
on 2016-06-07 14:03:22 UTC
(
hide
)
Description:
Bug 16684 - Add advanced error reporting for .perl files in atomicupdates
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2016-06-07 14:03:22 UTC
Size:
1.28 KB
patch
obsolete
>From 1664481e0ef61eb9e24a30880395d564c7c40cec Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 7 Jun 2016 14:01:04 +0000 >Subject: [PATCH] Bug 16684 - Add advanced error reporting for .perl files in > atomicupdates > >It would be nice for developers to know why a .perl file is not >functioning. Right now no errors are generated. >--- > installer/data/mysql/updatedatabase.pl | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 657ba4e..7e2de86 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -30,6 +30,8 @@ > use strict; > use warnings; > >+use feature 'say'; >+ > # CPAN modules > use DBI; > use Getopt::Long; >@@ -12628,7 +12630,12 @@ foreach my $file ( sort readdir $dirh ) { > my $installer = C4::Installer->new(); > my $rv = $installer->load_sql( $update_dir . $file ) ? 0 : 1; > } elsif ( $file =~ /\.perl$/ ) { >- do $update_dir . $file; >+ my $r = do $update_dir . $file; >+ unless ($r) { >+ say "Couldn't parse $file: $@" if $@; >+ say "Couldn't do $file: $!" unless defined $r; >+ say "Couldn't run $file" unless $r; >+ } > } > } > >-- >2.1.4
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 16684
: 52131