[Gnucash-changes] Improve error handling in HBCI operations.
Christian Stimming
cstim at cvs.gnucash.org
Sat Mar 12 06:50:48 EST 2005
Log Message:
-----------
Improve error handling in HBCI operations.
2005-03-12 Christian Stimming <stimming at tuhh.de>
* src/import-export/hbci/gnc-hbci-gettrans.c, hbci-interaction.h:
Improve error handling in HBCI operations.
Modified Files:
--------------
gnucash:
ChangeLog
gnucash/src/import-export/hbci:
gnc-hbci-gettrans.c
hbci-interaction.c
hbci-interaction.h
hbci-interactionP.h
Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1896
retrieving revision 1.1897
diff -LChangeLog -LChangeLog -u -r1.1896 -r1.1897
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,8 @@
+2005-03-12 Christian Stimming <stimming at tuhh.de>
+
+ * src/import-export/hbci/gnc-hbci-gettrans.c, hbci-interaction.h:
+ Improve error handling in HBCI operations.
+
2005-02-26 Christian Stimming <stimming at tuhh.de>
* src/import-export/hbci/gnc-hbci-kvp.c (force_account_dirty):
Index: hbci-interaction.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/hbci-interaction.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/import-export/hbci/hbci-interaction.h -Lsrc/import-export/hbci/hbci-interaction.h -u -r1.12 -r1.13
--- src/import-export/hbci/hbci-interaction.h
+++ src/import-export/hbci/hbci-interaction.h
@@ -42,6 +42,7 @@
void GNCInteractor_set_cache_valid(GNCInteractor *i, gboolean value);
GtkWidget *GNCInteractor_parent(GNCInteractor *i);
void GNCInteractor_add_log_text (GNCInteractor *i, const char *msg);
+gboolean GNCInteractor_hadErrors (const GNCInteractor *i);
#endif
Index: hbci-interactionP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/hbci-interactionP.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/import-export/hbci/hbci-interactionP.h -Lsrc/import-export/hbci/hbci-interactionP.h -u -r1.11 -r1.12
--- src/import-export/hbci/hbci-interactionP.h
+++ src/import-export/hbci/hbci-interactionP.h
@@ -76,6 +76,8 @@
GHashTable *showbox_hash;
GtkWidget *showbox_last;
+ /* Flag whether the last dialog showed any error */
+ gboolean msgBoxError;
};
void delete_GNCInteractor (GNCInteractor *data);
Index: hbci-interaction.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/hbci-interaction.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -Lsrc/import-export/hbci/hbci-interaction.c -Lsrc/import-export/hbci/hbci-interaction.c -u -r1.50 -r1.51
--- src/import-export/hbci/hbci-interaction.c
+++ src/import-export/hbci/hbci-interaction.c
@@ -203,6 +203,12 @@
}
}
+gboolean GNCInteractor_hadErrors (const GNCInteractor *i)
+{
+ g_assert (i);
+ return i->msgBoxError != 0;
+}
+
/* ************************************************************
*/
@@ -530,6 +536,7 @@
g_assert(ab);
data = AB_Banking_GetUserData(ab);
g_assert(data);
+ data->msgBoxError = flags & AB_BANKING_MSG_FLAGS_TYPE_ERROR;
text = gnc_hbci_utf8ToLatin1(data, utf8text);
title = gnc_hbci_utf8ToLatin1(data, utf8title);
Index: gnc-hbci-gettrans.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-gettrans.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -Lsrc/import-export/hbci/gnc-hbci-gettrans.c -Lsrc/import-export/hbci/gnc-hbci-gettrans.c -u -r1.37 -r1.38
--- src/import-export/hbci/gnc-hbci-gettrans.c
+++ src/import-export/hbci/gnc-hbci-gettrans.c
@@ -107,7 +107,9 @@
AB_Banking_EnqueueJob(api, job);
/* Execute Outbox. */
- if (!gnc_AB_BANKING_execute (parent, api, job, interactor)) {
+ if (!gnc_AB_BANKING_execute (parent, api, job, interactor) ||
+ (AB_Job_GetStatus(job) == AB_Job_StatusError) ||
+ GNCInteractor_hadErrors (interactor)) {
/* AB_BANKING_executeOutbox failed. */
gnc_hbci_cleanup_job(api, job);
return;
More information about the gnucash-changes
mailing list