[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[4397] trunk



Revision: 4397
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4397&view=rev
Author:   einhverfr
Date:     2012-03-07 08:16:57 +0000 (Wed, 07 Mar 2012)
Log Message:
-----------
error routines now log, and log db version and company name.  db version and company name also included in error messages

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/Form.pm
    trunk/LedgerSMB.pm

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2012-03-07 08:04:11 UTC (rev 4396)
+++ trunk/Changelog	2012-03-07 08:16:57 UTC (rev 4397)
@@ -12,6 +12,7 @@
 * Added +/- selection indicators to menu CSS (Chris T)
 * Added "dynatable.html" template that can be included in templates (Chris T)
 * Dynatable forms obtained through GET now show link back to form (Chris T)
+* LedgerSMB->error and Form->error now show db version and company (Chris T)
 
 Customer/Vendor Handling 
 * Added sales tax id and license number fields for companies (Chris T)

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2012-03-07 08:04:11 UTC (rev 4396)
+++ trunk/LedgerSMB/Form.pm	2012-03-07 08:16:57 UTC (rev 4397)
@@ -465,9 +465,13 @@
         if ( !$self->{header} ) {
             $self->header;
         }
+        $logger->error($msg);
+        $logger->error("dbversion: $self->{dbversion}, company: $self->{company}");
 
         print
-          qq|<body><h2 class="error">Error!</h2> <p><b>$self->{msg}</b></body>|;
+          qq|<body><h2 class="error">Error!</h2> <p><b>$self->{msg}</b>
+             <p>dbversion: $self->{dbversion}, company: $self->{company}</p>
+             </body>|;
 
         $self->finalize_request();
 

Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm	2012-03-07 08:04:11 UTC (rev 4396)
+++ trunk/LedgerSMB.pm	2012-03-07 08:16:57 UTC (rev 4397)
@@ -808,6 +808,8 @@
 
         $self->{msg}    = $msg;
         $self->{format} = "html";
+        $logger->error($msg);
+        $logger->error("dbversion: $self->{dbversion}, company: $self->{company}");
 
         delete $self->{pre};
 
@@ -816,7 +818,9 @@
         print "<head><link rel='stylesheet' href='css/$self->{_user}->{stylesheet}' type='text/css'></head>";
         $self->{msg} =~ s/\n/<br \/>\n/;
         print
-          qq|<body><h2 class="error">Error!</h2> <p><b>$self->{msg}</b></body>|;
+          qq|<body><h2 class="error">Error!</h2> <p><b>$self->{msg}</b></p>
+             <p>dbversion: $self->{dbversion}, company: $self->{company}</p>
+             </body>|;
 
         exit;
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.