[Gnucash-changes] Add extra debugging (#165571).
Derek Atkins
warlord at cvs.gnucash.org
Sun Jan 30 20:20:54 EST 2005
Log Message:
-----------
Add extra debugging (#165571).
* src/engine/Scrub.c:
* src/engine/Transaction.c:
Add the transaction guid to some error warning messages.
Fixes #165571.
Modified Files:
--------------
gnucash:
ChangeLog
gnucash/src/engine:
Scrub.c
Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1886
retrieving revision 1.1887
diff -LChangeLog -LChangeLog -u -r1.1886 -r1.1887
--- ChangeLog
+++ ChangeLog
@@ -16,6 +16,11 @@
* src/engine/Account.c:
- updated implementation of qofAccountSetParent().
+ * src/engine/Scrub.c:
+ * src/engine/Transaction.c:
+ Add the transaction guid to some error warning messages.
+ Fixes #165571.
+
2005-01-29 Derek Atkins <derek at ihtfp.com>
David Montenegro's patch for bugs #95551, #124367.
Index: Scrub.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Scrub.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -Lsrc/engine/Scrub.c -Lsrc/engine/Scrub.c -u -r1.66 -r1.67
--- src/engine/Scrub.c
+++ src/engine/Scrub.c
@@ -573,16 +573,21 @@
}
else if (!gnc_commodity_equiv (retval,trans->common_currency))
{
- PWARN ("expected common currency %s but found %s\n",
+ char guid_str[GUID_ENCODING_LENGTH+1];
+ guid_to_string_buff(xaccTransGetGUID(trans), guid_str);
+ PWARN ("expected common currency %s but found %s in txn %s\n",
gnc_commodity_get_unique_name (trans->common_currency),
- gnc_commodity_get_unique_name (retval));
+ gnc_commodity_get_unique_name (retval), guid_str);
}
if (NULL == retval)
{
/* In every situation I can think of, this routine should return
* common currency. So make note of this ... */
- PWARN ("unable to find a common currency, and that is strange.");
+ char guid_str[GUID_ENCODING_LENGTH+1];
+ guid_to_string_buff(xaccTransGetGUID(trans), guid_str);
+ PWARN ("unable to find a common currency in txn %s, and that is strange.",
+ guid_str);
}
return retval;
@@ -623,7 +628,11 @@
else
{
SplitList *node;
- PWARN ("no common transaction currency found for trans=\"%s\"", trans->description);
+ char guid_str[GUID_ENCODING_LENGTH+1];
+ guid_to_string_buff(xaccTransGetGUID(trans), guid_str);
+ PWARN ("no common transaction currency found for trans=\"%s\" (%s)",
+ trans->description, guid_str);
+
for (node=trans->splits; node; node=node->next)
{
Split *split = node->data;
More information about the gnucash-changes
mailing list