2002-11-29 Christian Stimming <stimming@tuhh.de>

* src/import-export/hbci/gnc-hbci-utils.c, gnc-hbci-*.c: Catch the
	condition gracefully when OpenHBCI config file does not exist.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7569 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2002-11-29 17:41:22 +00:00
parent 6488f2a402
commit a564daf71c
5 changed files with 18 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2002-11-29 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/gnc-hbci-utils.c, gnc-hbci-*.c: Catch the
condition gracefully when OpenHBCI config file does not exist.
2002-11-29 Derek Atkins <derek@ihtfp.com>
* src/gnome-utils/dialog-exchange.h -- header for the exchange-rate dialog

View File

@ -48,11 +48,11 @@ gnc_hbci_getbalance (GtkWidget *parent, Account *gnc_acc)
return;
api = gnc_hbci_api_new_currentbook (parent, &interactor);
g_assert (interactor);
if (api == NULL) {
printf("gnc_hbci_getbalance: Couldn't get HBCI API.\n");
return;
}
g_assert (interactor);
h_acc = gnc_hbci_get_hbci_acc (api, gnc_acc);
if (h_acc == NULL) {

View File

@ -63,11 +63,11 @@ gnc_hbci_gettrans (GtkWidget *parent, Account *gnc_acc)
g_assert(gnc_acc);
api = gnc_hbci_api_new_currentbook (parent, &interactor);
g_assert (interactor);
if (api == NULL) {
printf("gnc_hbci_gettrans: Couldn't get HBCI API.\n");
return;
}
g_assert (interactor);
h_acc = gnc_hbci_get_hbci_acc (api, gnc_acc);
if (h_acc == NULL) {

View File

@ -50,11 +50,11 @@ gnc_hbci_maketrans (GtkWidget *parent, Account *gnc_acc,
g_assert(gnc_acc);
api = gnc_hbci_api_new_currentbook (parent, &interactor);
g_assert (interactor);
if (api == NULL) {
printf("gnc_hbci_maketrans: Couldn't get HBCI API. Nothing will happen.\n");
return;
}
g_assert (interactor);
h_acc = gnc_hbci_get_hbci_acc (api, gnc_acc);
if (h_acc == NULL) {

View File

@ -43,8 +43,17 @@ gnc_hbci_api_new (const char *filename, gboolean allowNewFile,
if (!filename)
return NULL;
if (!allowNewFile &&
(!g_file_test (filename, G_FILE_TEST_ISFILE | G_FILE_TEST_ISLINK)))
(!g_file_test (filename, G_FILE_TEST_ISFILE | G_FILE_TEST_ISLINK))) {
gnc_warning_dialog_parented
(parent,
/* Translators: Strings from this file are really only needed
* inside Germany (HBCI is not supported anywhere else). You
* may safely ignore strings from the import-export/hbci
* subdirectory in other countries. */
_("Error while loading OpenHBCI config file:\n %s: No such file or directory.\n"), filename);
return NULL;
}
api = HBCI_API_new (FALSE, TRUE);