Commit 3688db32 authored by sikeda's avatar sikeda
Browse files

[-dev] Fix ugry formatting of traceback.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@10400 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent f0eebc47
...@@ -39,16 +39,17 @@ Subject: [% FILTER qencode %][%|loc(db_type)%]No DataBase Driver for %1[%END%][% ...@@ -39,16 +39,17 @@ Subject: [% FILTER qencode %][%|loc(db_type)%]No DataBase Driver for %1[%END%][%
[% ELSIF type == 'crash' -%] [% ELSIF type == 'crash' -%]
Subject: [% FILTER qencode %][%|loc(crashed_process)%]Previous process %1 crashed[%END%][%END%] Subject: [% FILTER qencode %][%|loc(crashed_process)%]Previous process %1 crashed[%END%][%END%]
X-Sympa-NoWrap: yes
[%|loc(crashed_process,pid)%]Previous process %1 (with pid %2) has died unexpectedly.[%END%] [%|wrap(0,0)%][%|loc(crashed_process,pid)%]Previous process %1 (with PID %2) has died unexpectedly.[%END%][%END#wrap%]
[%|loc(crash_date)%]Date of crash: %1[%END%] [%|loc(crash_date)%]Date of crash: %1[%END%]
[%|loc%]Errors:[%END%] [%|loc%]Errors:[%END%]
[% FOREACH err IN crash_err%] [% FOREACH err IN crash_err -%]
[% err %] [% err %]
[% END %] [% END %]
[%|loc%]Check log file for further details.[%END%] [%|wrap(0,0)%][%|loc%]Check log file for further details.[%END%][%END#wrap%]
[% ELSIF type == 'upgrade_failed' -%] [% ELSIF type == 'upgrade_failed' -%]
Subject: [% FILTER qencode %][%|loc%]Upgrade procedures failed[%END%][%END%] Subject: [% FILTER qencode %][%|loc%]Upgrade procedures failed[%END%][%END%]
......
...@@ -1043,7 +1043,7 @@ sub _crash_handler { ...@@ -1043,7 +1043,7 @@ sub _crash_handler {
Sys::Syslog::closelog(); # flush log Sys::Syslog::closelog(); # flush log
Log::set_log_level(-1); # disable log Log::set_log_level(-1); # disable log
Carp::confess("DIED: $msg"); Carp::confess("DIED: $msg\n");
} }
1; 1;
...@@ -2687,7 +2687,7 @@ sub send_crash_report { ...@@ -2687,7 +2687,7 @@ sub send_crash_report {
my (@err_output, $err_date); my (@err_output, $err_date);
if(-f $err_file) { if(-f $err_file) {
open(ERR, $err_file); open(ERR, $err_file);
@err_output = <ERR>; @err_output = map { chomp $_; $_; } <ERR>;
close ERR; close ERR;
$err_date = gettext_strftime "%d %b %Y %H:%M", localtime((stat($err_file))[9]); $err_date = gettext_strftime "%d %b %Y %H:%M", localtime((stat($err_file))[9]);
} }
......
...@@ -1054,8 +1054,9 @@ Log::do_log(info => "WWSympa started, process $$"); ...@@ -1054,8 +1054,9 @@ Log::do_log(info => "WWSympa started, process $$");
$robot = $Conf{'host'} unless $robot; $robot = $Conf{'host'} unless $robot;
   
## Create Robot object # Not yet implemented
$robot_object = new Robot $robot; ### Create Robot object
#$robot_object = new Robot $robot;
   
## Default robot ## Default robot
if ($robot eq $Conf{'host'}) { if ($robot eq $Conf{'host'}) {
...@@ -1834,12 +1835,12 @@ sub _crash_handler { ...@@ -1834,12 +1835,12 @@ sub _crash_handler {
chomp $msg; chomp $msg;
printf STDERR "DIED: %s\n", $msg; printf STDERR "DIED: %s\n", $msg;
wwslog('err', 'DIED: %s', $msg); wwslog('err', 'DIED: %s', $msg);
eval { Site->send_notify_to_listmaster(undef, undef, undef, 1); }; eval { List::send_notify_to_listmaster(undef, undef, undef, 1); };
eval { SDM::db_disconnect(); }; # unlock database eval { SDM::db_disconnect(); }; # unlock database
Sys::Syslog::closelog(); # flush log Sys::Syslog::closelog(); # flush log
Log::set_log_level(-1); # disable log Log::set_log_level(-1); # disable log
   
$param->{'traceback'} = Carp::longmess($msg); $param->{'traceback'} = Carp::longmess("$msg\n");
$param->{'error_message'} = $msg; $param->{'error_message'} = $msg;
$param->{'main_title'} ||= Conf::get_robot_conf($robot, 'title'); $param->{'main_title'} ||= Conf::get_robot_conf($robot, 'title');
$param->{'last_action'} = $param->{'action'}; $param->{'last_action'} = $param->{'action'};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment