diff --git a/include/action.common.inc.php b/include/action.common.inc.php
index c60f13ab3..59d9041f3 100644
--- a/include/action.common.inc.php
+++ b/include/action.common.inc.php
@@ -149,7 +149,7 @@ if ($sub_action == "update")
$act->get();
$act->fromArray($_POST);
$error_id=$e->getCode();
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
}
}
//----------------------------------------------------------------------
@@ -296,7 +296,7 @@ if ($sub_action == "save_action_st2")
echo '';
$sub_action="add_action";
$error_id=$e->getCode();
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
}
}
//--------------------------------------------------------------------------------
diff --git a/include/ajax/ajax_card.php b/include/ajax/ajax_card.php
index 628acb640..9b61631ba 100644
--- a/include/ajax/ajax_card.php
+++ b/include/ajax/ajax_card.php
@@ -118,7 +118,7 @@ case 'rmfa':
{
$cn->rollback();
record_log($e->getMessage());
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo $e->getMessage();
}
$html=ob_get_contents();
diff --git a/include/ajax/ajax_display_letter.php b/include/ajax/ajax_display_letter.php
index 9a90996c0..06f36e189 100644
--- a/include/ajax/ajax_display_letter.php
+++ b/include/ajax/ajax_display_letter.php
@@ -38,7 +38,7 @@ try {
}catch (Exception $e )
{
record_log($e->getMessage());
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
return;
}
diff --git a/include/ajax/ajax_ledger.php b/include/ajax/ajax_ledger.php
index 29b797a78..316a5a662 100644
--- a/include/ajax/ajax_ledger.php
+++ b/include/ajax/ajax_ledger.php
@@ -161,7 +161,7 @@ case 'rmop':
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
$e->getMessage();
$cn->rollback();
}
@@ -207,7 +207,7 @@ case 'de':
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo Icon_Action::close($div);
echo '
'._("Désolé il y a une erreur").'
';
}
@@ -512,7 +512,7 @@ case 'save':
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
if ( DEBUG ) echo $e->getMessage();
alert(_( "Changement impossible: on ne peut pas changer la date dans une période fermée"));
}
@@ -570,7 +570,7 @@ case 'reverseop':
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo $e->getMessage();
$cn->rollback();
}
diff --git a/include/ajax/ajax_periode.php b/include/ajax/ajax_periode.php
index 5ef93d85b..e8e2cb133 100644
--- a/include/ajax/ajax_periode.php
+++ b/include/ajax/ajax_periode.php
@@ -205,7 +205,7 @@ switch ($act)
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
$html=$e->getTrace();
throw $e;
}
diff --git a/include/ajax/ajax_tva_parameter.php b/include/ajax/ajax_tva_parameter.php
index 0e92bbc02..8be4577bb 100644
--- a/include/ajax/ajax_tva_parameter.php
+++ b/include/ajax/ajax_tva_parameter.php
@@ -42,7 +42,7 @@ try
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
return;
}
diff --git a/include/anc_key.inc.php b/include/anc_key.inc.php
index da0ab116f..7298ca5a5 100644
--- a/include/anc_key.inc.php
+++ b/include/anc_key.inc.php
@@ -56,7 +56,7 @@ switch ($op)
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo span($e->getMessage(), ' class="notice"');
Anc_Key::display_list();
Anc_Key::key_add();
diff --git a/include/card_attr.inc.php b/include/card_attr.inc.php
index d0fa1fbab..fa8bcae8d 100644
--- a/include/card_attr.inc.php
+++ b/include/card_attr.inc.php
@@ -56,7 +56,7 @@ if ( isset($_POST['save']))
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
alert($e->getMessage());
$cn->rollback();
}
diff --git a/include/cfgledger.inc.php b/include/cfgledger.inc.php
index 56561e503..7984d48b9 100644
--- a/include/cfgledger.inc.php
+++ b/include/cfgledger.inc.php
@@ -62,7 +62,7 @@ if ( $action_frm == 'update')
} catch (Exception $e)
{
record_log($e->getMessage());
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
alert($e->getMessage());
}
}
@@ -88,7 +88,7 @@ if ($action_frm == 'delete' )
catch (Exception $e)
{
record_log($e->getMessage());
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
alert ($e->getMessage());
}
@@ -111,7 +111,7 @@ if (isset($_POST['add']))
catch (Exception $e)
{
record_log($e->getMessage());
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
alert($e->getMessage());
}
}
@@ -146,7 +146,7 @@ switch ($sa)
catch (Exception $e)
{
record_log($e->getMessage());
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
alert($e->getMessage());
}
break;
diff --git a/include/class/acc_bilan.class.php b/include/class/acc_bilan.class.php
index a7f81cfc1..51b8b5fba 100644
--- a/include/class/acc_bilan.class.php
+++ b/include/class/acc_bilan.class.php
@@ -284,7 +284,7 @@ class Acc_Bilan
}
catch(Exception $Ex)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo $Ex->getMessage();
throw $Ex;
}
diff --git a/include/class/acc_ledger.class.php b/include/class/acc_ledger.class.php
index e1c85d3ce..30df01e4d 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -373,7 +373,7 @@ class Acc_Ledger extends jrn_def_sql
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
$this->db->rollback();
throw $e;
}
@@ -834,7 +834,7 @@ class Acc_Ledger extends jrn_def_sql
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
if ($e->getCode()==1)
{
echo _("Aucune période ouverte");
@@ -1357,7 +1357,7 @@ class Acc_Ledger extends jrn_def_sql
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
$this->db->rollback();
echo _('OPERATION ANNULEE ');
echo '
';
@@ -2134,7 +2134,7 @@ class Acc_Ledger extends jrn_def_sql
catch (Exception $e)
{
$cn->rollback();
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
}
$cn->commit();
}
@@ -2385,7 +2385,7 @@ class Acc_Ledger extends jrn_def_sql
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
throw $e;
}
}
@@ -2642,7 +2642,7 @@ class Acc_Ledger extends jrn_def_sql
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
throw $e;
}
}
diff --git a/include/class/acc_ledger_fin.class.php b/include/class/acc_ledger_fin.class.php
index 22ff0f0c1..15c381211 100644
--- a/include/class/acc_ledger_fin.class.php
+++ b/include/class/acc_ledger_fin.class.php
@@ -1003,7 +1003,7 @@ class Acc_Ledger_Fin extends Acc_Ledger
__FILE__ . ':' . __LINE__ . ' ' .
$e->getMessage();
$this->db->rollback();
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
throw new Exception($r);
}
$this->db->commit();
diff --git a/include/class/acc_ledger_info.class.php b/include/class/acc_ledger_info.class.php
index 137d67290..be9e9ea1d 100644
--- a/include/class/acc_ledger_info.class.php
+++ b/include/class/acc_ledger_info.class.php
@@ -63,7 +63,7 @@ class Acc_Ledger_Info
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo "Echec sauvegarde info additionnelles";
throw $e;
}
@@ -86,7 +86,7 @@ class Acc_Ledger_Info
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
$this->cn->rollback();
echo "Echec sauvegarde info additionnelles";
throw $e;
diff --git a/include/class/acc_ledger_purchase.class.php b/include/class/acc_ledger_purchase.class.php
index 523cd59c8..d47336625 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -944,7 +944,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
}//end try
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo ''.
'Erreur dans l\'enregistrement '.
__FILE__.':'.__LINE__.' '.
@@ -1051,7 +1051,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
if ($e->getCode() == 1 )
{
throw new Exception( _("Aucune période ouverte"));
diff --git a/include/class/acc_ledger_sold.class.php b/include/class/acc_ledger_sold.class.php
index 50cfbb49a..2704e47c5 100644
--- a/include/class/acc_ledger_sold.class.php
+++ b/include/class/acc_ledger_sold.class.php
@@ -607,7 +607,7 @@ class Acc_Ledger_Sold extends Acc_Ledger {
}
}
} catch (Exception $e) {
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo '' .
'Erreur dans l\'enregistrement ' .
__FILE__ . ':' . __LINE__ . ' ' .
diff --git a/include/class/acc_report.class.php b/include/class/acc_report.class.php
index d08753521..952c40a37 100644
--- a/include/class/acc_report.class.php
+++ b/include/class/acc_report.class.php
@@ -216,7 +216,7 @@ class Acc_Report
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
$this->db->rollback();
echo $e->getMessage();
}
@@ -258,7 +258,7 @@ class Acc_Report
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
$this->db->rollback();
echo $e->getMessage();
}
diff --git a/include/class/anc_group_operation.class.php b/include/class/anc_group_operation.class.php
index 991998822..b0058ef71 100644
--- a/include/class/anc_group_operation.class.php
+++ b/include/class/anc_group_operation.class.php
@@ -74,7 +74,7 @@ class Anc_Group_Operation
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo $e->getTrace();
$this->db->rollback();
throw new Exception($e);
@@ -260,7 +260,7 @@ class Anc_Group_Operation
}
catch (Exception $ex)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo ''.
'Erreur dans l\'enregistrement '.
__FILE__.':'.__LINE__.' '.
diff --git a/include/class/anc_key.class.php b/include/class/anc_key.class.php
index 2ad6340f1..4fec773ed 100644
--- a/include/class/anc_key.class.php
+++ b/include/class/anc_key.class.php
@@ -268,7 +268,7 @@ class Anc_Key
{
if ( DEBUG ) { echo $e->getTraceAsString(); } else { echo _('erreur').$e->getMessage();}
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
$cn->rollback();
}
}
diff --git a/include/class/anc_operation.class.php b/include/class/anc_operation.class.php
index 672f393e2..6e87cc9df 100644
--- a/include/class/anc_operation.class.php
+++ b/include/class/anc_operation.class.php
@@ -491,7 +491,7 @@ class Anc_Operation
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
}
}
/*!\brief display the form for PA
diff --git a/include/class/default_menu.class.php b/include/class/default_menu.class.php
index 8b973d62e..80a9de07d 100644
--- a/include/class/default_menu.class.php
+++ b/include/class/default_menu.class.php
@@ -106,7 +106,7 @@ class Default_Menu
}
} catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo $e->getMessage();
throw $e;
}
diff --git a/include/class/document_modele.class.php b/include/class/document_modele.class.php
index af8d254c4..a1722a9d2 100644
--- a/include/class/document_modele.class.php
+++ b/include/class/document_modele.class.php
@@ -194,7 +194,7 @@ class Document_modele
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
rollback($this->cn);
return ;
}
@@ -360,7 +360,7 @@ class Document_modele
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
rollback($this->cn);
return ;
}
diff --git a/include/class/document_type.class.php b/include/class/document_type.class.php
index 74ebafdaf..8f0d2fbf1 100644
--- a/include/class/document_type.class.php
+++ b/include/class/document_type.class.php
@@ -103,7 +103,7 @@ class Document_type
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
alert(j(_("Impossible d'ajouter [$p_value] ") . $e->getMessage()));
}
}
@@ -120,7 +120,7 @@ class Document_type
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
alert(" Erreur " . $e->getMessage());
}
}
@@ -133,7 +133,7 @@ class Document_type
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
alert("Erreur " . $e->getMessage());
}
}
diff --git a/include/class/dossier.class.php b/include/class/dossier.class.php
index 51ea7f03f..1f62b042b 100644
--- a/include/class/dossier.class.php
+++ b/include/class/dossier.class.php
@@ -326,7 +326,7 @@ class Dossier
{
echo_warning($e->getMessage());
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
$cn->rollback();
}
}
diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php
index 999b50271..876351e36 100644
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@ -1117,7 +1117,7 @@ class Fiche
$e->getMessage().
'';
record_log($e->getMessage());
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
$this->cn->rollback();
return;
}
diff --git a/include/class/fiche_attr.class.php b/include/class/fiche_attr.class.php
index 5ddb70971..c764731e5 100644
--- a/include/class/fiche_attr.class.php
+++ b/include/class/fiche_attr.class.php
@@ -99,7 +99,7 @@ class Fiche_Attr
$this->cn->exec_sql($this->ad_extra);
}catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
throw new Exception ("La requête SQL ".h($this->ad_extra)." est invalide ");
}
}
@@ -161,7 +161,7 @@ class Fiche_Attr
);
} catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
throw $e;
}
@@ -185,7 +185,7 @@ class Fiche_Attr
);
}catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
throw $e;
}
diff --git a/include/class/periode.class.php b/include/class/periode.class.php
index 7cca1f516..43cde5797 100644
--- a/include/class/periode.class.php
+++ b/include/class/periode.class.php
@@ -273,7 +273,7 @@ class Periode
catch (Exception $e)
{
record_log($e->getMessage()." - ".$e->getCode());
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
$this->cn->rollback();
throw $e;
}
@@ -495,7 +495,7 @@ class Periode
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
$this->cn->rollback();
throw $e;
}
diff --git a/include/class/pre_op_ach.class.php b/include/class/pre_op_ach.class.php
index 7caa7668d..722c9deed 100644
--- a/include/class/pre_op_ach.class.php
+++ b/include/class/pre_op_ach.class.php
@@ -104,7 +104,7 @@ class Pre_op_ach extends Pre_operation_detail
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo ($e->getMessage());
$this->db->rollback();
}
diff --git a/include/class/pre_op_advanced.class.php b/include/class/pre_op_advanced.class.php
index 51ba703e5..3d78bc9e7 100644
--- a/include/class/pre_op_advanced.class.php
+++ b/include/class/pre_op_advanced.class.php
@@ -98,7 +98,7 @@ class Pre_Op_Advanced extends Pre_operation_detail
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo ($e->getMessage());
$this->db->rollback();
}
diff --git a/include/class/pre_op_fin.class.php b/include/class/pre_op_fin.class.php
index e443605ef..ea16b0dbf 100644
--- a/include/class/pre_op_fin.class.php
+++ b/include/class/pre_op_fin.class.php
@@ -86,7 +86,7 @@ class Pre_op_fin extends Pre_operation_detail
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo ($e->getMessage());
$this->db->rollback();
}
diff --git a/include/class/pre_op_ods.class.php b/include/class/pre_op_ods.class.php
index dc30e34f6..1130e6208 100644
--- a/include/class/pre_op_ods.class.php
+++ b/include/class/pre_op_ods.class.php
@@ -78,7 +78,7 @@ class Pre_op_ods extends Pre_operation_detail
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo ($e->getMessage());
$this->db->rollback();
}
diff --git a/include/class/pre_op_ven.class.php b/include/class/pre_op_ven.class.php
index 2ffe031cd..3d97c0687 100644
--- a/include/class/pre_op_ven.class.php
+++ b/include/class/pre_op_ven.class.php
@@ -102,7 +102,7 @@ class Pre_op_ven extends Pre_operation_detail
}
catch (Exception $e)
{
- record_log($e->getMessage()." ".$e->getTraceAsString());;
+ record_log($e);
echo ($e->getMessage());
$this->db->rollback();
}
diff --git a/include/lib/ac_common.php b/include/lib/ac_common.php
index 39c65de90..44ee884ad 100644
--- a/include/lib/ac_common.php
+++ b/include/lib/ac_common.php
@@ -1331,9 +1331,8 @@ function is_msie()
*/
function record_log($p_message)
{
- error_log("noalyss".$p_message,0);
- error_log("noalyss GET [".var_export($_GET, true)."]",0);
- error_log( "noalyss POST [".var_export($_POST, true)."]",0);
+ error_log("noalyss".print_r($p_message,true),0);
+ error_log("noalyss GET [".var_export($_GET, true)."] POST [".var_export($_POST, true)."]",0);
}
if(!function_exists('tracedebug')) {
function tracedebug($file,$var, $label = NULL) {