Bugzilla – Attachment 174423 Details for
Bug 38299
Errors with updates caught in C4::Installer should be colored/highlighted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38299: (discussion) Move failure into same level
Bug-38299-discussion-Move-failure-into-same-level.patch (text/plain), 2.26 KB, created by
Martin Renvoize (ashimema)
on 2024-11-12 15:44:53 UTC
(
hide
)
Description:
Bug 38299: (discussion) Move failure into same level
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-11-12 15:44:53 UTC
Size:
2.26 KB
patch
obsolete
>From 984ca0487599bd53ece6fefd8e3a807d7d6e0000 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 12 Nov 2024 15:23:30 +0000 >Subject: [PATCH] Bug 38299: (discussion) Move failure into same level > >This patch adds the failures in at the same level as the rest of the >revision output (i.e. indented under the specific database revision) and >uses the standard failure coloring instead of the local update_error >class. > >This is a proposal and may need more work to clarify and perhaps remove >the duplicated/collected errors at the bottom of the update. Now that we >hard stop if an update fails, I'm not sure collecting errors at the >bottom makes as much sense as it once did? >--- > C4/Installer.pm | 2 ++ > installer/data/mysql/updatedatabase.pl | 4 ++-- > 2 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/C4/Installer.pm b/C4/Installer.pm >index 952b6290519..e70b0142a33 100644 >--- a/C4/Installer.pm >+++ b/C4/Installer.pm >@@ -30,6 +30,7 @@ use C4::Context; > use Koha::Schema; > use Koha; > use Koha::Installer; >+use Koha::Installer::Output qw ( say_failure ); > > use vars qw(@ISA @EXPORT); > BEGIN { >@@ -742,6 +743,7 @@ sub run_db_rev { > ); > } > catch { >+ say_failure( $outfh, "ERROR: " . $_ ); > $error = $_; > }; > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index a491bcf0220..f4f43a89c0d 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -24302,7 +24302,7 @@ unless ( $ENV{HTTP_HOST} ) { # Is that correct? > } > for my $e ( @{ $report->{error} } ) { > say Encode::encode_utf8(join "\n", @{$e->{output}}); >- say_failure( undef, Encode::encode_utf8("ERROR - " . $e->{error}) ); >+ #say_failure( undef, Encode::encode_utf8("ERROR - " . $e->{error}) ); > $error_code = 1; > } > >@@ -24313,7 +24313,7 @@ unless ( $ENV{HTTP_HOST} ) { # Is that correct? > } > for my $e ( @{ $report->{error} } ) { > say Encode::encode_utf8(join "\n", @{$e->{output}}); >- say_failure( undef, Encode::encode_utf8("ERROR - " . $e->{error}) ); >+ #say_failure( undef, Encode::encode_utf8("ERROR - " . $e->{error}) ); > $error_code = 1; > } > exit $error_code; >-- >2.47.0
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 38299
:
174250
|
174251
|
174252
|
174254
|
174255
|
174256
|
174259
|
174290
|
174291
|
174292
|
174293
|
174421
|
174423
|
174424
|
174455
|
174673
|
174674
|
174675
|
174676
|
174677