From: Jan Büren Date: Wed, 2 Mar 2016 11:33:45 +0000 (+0100) Subject: SelfTest - bessere Fehlerbehandlung für Einbinden der Test-Module X-Git-Tag: release-3.4.1~365 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8da71e6d954eed7f480dd2a64a81ff4dd11d237e;p=kivitendo-erp.git SelfTest - bessere Fehlerbehandlung für Einbinden der Test-Module Fehlermeldung an den TaskServer zurückgeben. Fehlermeldung(en) in der Status-E-Mail hinzufügen. --- diff --git a/SL/BackgroundJob/SelfTest.pm b/SL/BackgroundJob/SelfTest.pm index 514562590..2f8883339 100644 --- a/SL/BackgroundJob/SelfTest.pm +++ b/SL/BackgroundJob/SelfTest.pm @@ -13,6 +13,8 @@ use FindBin; use SL::DB::AuthUser; use SL::DB::Default; use SL::Common; +use SL::Locale::String qw(t8); +use Carp; use Rose::Object::MakeMethods::Generic ( array => [ @@ -66,6 +68,7 @@ sub run { $self->_send_email; } + croak t8("Unsuccessfully executed:" . join ("\n", $self->errors)) if $self->errors; return 1; } @@ -156,6 +159,7 @@ sub _prepare_report { database => $::auth->client->{dbname}, client => $::auth->client->{name}, path => $FindBin::Bin, + errors => $self->errors, ); my $output; diff --git a/templates/mail/self_test/status_mail.txt b/templates/mail/self_test/status_mail.txt index 7c3d306df..ac83cce8c 100644 --- a/templates/mail/self_test/status_mail.txt +++ b/templates/mail/self_test/status_mail.txt @@ -1,5 +1,10 @@ kivitendo selftest report. +[% IF errors %] + General error(s) have occured. + [% errors %] +[% END %] + Host: [% host %] Path: [% path %] DB: [% database %]