Uniformized sql error management
Eldy told me that this is the correct way to handle SQL errors…
This commit is contained in:
parent
70c467e429
commit
89692fb79e
@ -116,7 +116,9 @@ class box_bookmarks extends ModeleBoxes
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@ -141,7 +141,9 @@ class box_comptes extends ModeleBoxes
|
||||
}
|
||||
}
|
||||
else {
|
||||
dol_print_error($db);
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@ -138,7 +138,9 @@ class box_contracts extends ModeleBoxes
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -139,7 +139,9 @@ class box_factures_fourn extends ModeleBoxes
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoModifiedSupplierBills"));
|
||||
}
|
||||
else {
|
||||
dol_print_error($db);
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@ -114,7 +114,9 @@ class box_fournisseurs extends ModeleBoxes
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedSuppliers"));
|
||||
}
|
||||
else {
|
||||
dol_print_error($db);
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@ -92,7 +92,9 @@ class box_osc_clients extends ModeleBoxes
|
||||
}
|
||||
}
|
||||
else {
|
||||
dol_print_error($db);
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@ -134,7 +134,9 @@ class box_propales extends ModeleBoxes
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -134,7 +134,9 @@ class box_services_expired extends ModeleBoxes
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -129,7 +129,9 @@ class box_supplier_orders extends ModeleBoxes
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user