better debugging
This commit is contained in:
parent
6b77047cde
commit
7e6268df8c
2 changed files with 8 additions and 5 deletions
|
|
@ -17,8 +17,8 @@ package WebGUI::Session::ErrorHandler;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Log::Log4perl;
|
use Log::Log4perl;
|
||||||
use Data::Dumper;
|
|
||||||
use Apache2::RequestUtil;
|
use Apache2::RequestUtil;
|
||||||
|
use JSON;
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
|
|
@ -397,14 +397,19 @@ sub showDebug {
|
||||||
my $text = $self->session->stow->get('debug_error');
|
my $text = $self->session->stow->get('debug_error');
|
||||||
$text =~ s/\n/\<br \/\>\n/g;
|
$text =~ s/\n/\<br \/\>\n/g;
|
||||||
my $output = '<div style="text-align: left;background-color: #800000;color: #ffffff;">'.$text."</div>\n";
|
my $output = '<div style="text-align: left;background-color: #800000;color: #ffffff;">'.$text."</div>\n";
|
||||||
$text = $self->session->form->paramsHashRef();
|
|
||||||
$output .= '<div style="text-align: left;background-color: #ffffff;color: #000000;"><pre>Form Variables:'.Dumper($text)."</pre></div>\n" if(scalar(keys %{$text}));
|
|
||||||
$text = $self->session->stow->get('debug_warn');
|
$text = $self->session->stow->get('debug_warn');
|
||||||
$text =~ s/\n/\<br \/\>\n/g;
|
$text =~ s/\n/\<br \/\>\n/g;
|
||||||
$output .= '<div style="text-align: left;background-color: #ffdddd;color: #000000;">'.$text."</div>\n";
|
$output .= '<div style="text-align: left;background-color: #ffdddd;color: #000000;">'.$text."</div>\n";
|
||||||
$text = $self->session->stow->get('debug_info');
|
$text = $self->session->stow->get('debug_info');
|
||||||
$text =~ s/\n/\<br \/\>\n/g;
|
$text =~ s/\n/\<br \/\>\n/g;
|
||||||
$output .= '<div style="text-align: left;background-color: #ffffdd;color: #000000;">'.$text."</div>\n";
|
$output .= '<div style="text-align: left;background-color: #ffffdd;color: #000000;">'.$text."</div>\n";
|
||||||
|
$text = JSON::objToJson($self->session->form->paramsHashRef(), {pretty=>1, indent=>4});
|
||||||
|
$text =~ s/&/&/xsg;
|
||||||
|
$text =~ s/>/>/xsg;
|
||||||
|
$text =~ s/</</xsg;
|
||||||
|
$text =~ s/\n/\<br \/\>\n/g;
|
||||||
|
$text =~ s/ / /g;
|
||||||
|
$output .= '<div style="text-align: left;background-color: #cccccc;color: #000000;">'.$text."</div>\n";
|
||||||
$text = $self->session->stow->get('debug_debug');
|
$text = $self->session->stow->get('debug_debug');
|
||||||
$text =~ s/\n/\<br \/\>\n/g;
|
$text =~ s/\n/\<br \/\>\n/g;
|
||||||
$output .= '<div style="text-align: left;background-color: #dddddd;color: #000000;">'.$text."</div>\n";
|
$output .= '<div style="text-align: left;background-color: #dddddd;color: #000000;">'.$text."</div>\n";
|
||||||
|
|
|
||||||
|
|
@ -247,8 +247,6 @@ foreach my $filename (keys %config) {
|
||||||
my $dumpcmd = $config{$filename}{mysqlDump} || $mysqldump;
|
my $dumpcmd = $config{$filename}{mysqlDump} || $mysqldump;
|
||||||
my $backupTo = $config{$filename}{backupPath} || $backupDir;
|
my $backupTo = $config{$filename}{backupPath} || $backupDir;
|
||||||
mkdir($backupTo);
|
mkdir($backupTo);
|
||||||
print ("sql:".$upgrade{$config{$filename}{version}}{sql}."\n");
|
|
||||||
print ("pl:".$upgrade{$config{$filename}{version}}{pl}."\n");
|
|
||||||
while ($upgrade{$config{$filename}{version}}{sql} ne "" || $upgrade{$config{$filename}{version}}{pl} ne "") {
|
while ($upgrade{$config{$filename}{version}}{sql} ne "" || $upgrade{$config{$filename}{version}}{pl} ne "") {
|
||||||
my $upgrade = $upgrade{$config{$filename}{version}}{from};
|
my $upgrade = $upgrade{$config{$filename}{version}}{from};
|
||||||
unless ($skipBackup) {
|
unless ($skipBackup) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue