r19673 - gnucash/trunk/src/backend/sql - Bug 632166: Notify user when something goes wrong with a transaction save.
Derek Atkins
warlord at MIT.EDU
Tue Oct 19 12:24:12 EDT 2010
Geert Janssens <janssens-geert at telenet.be> writes:
> This change is definitely an improvement to the silent data loss issue we had.
>
> I see that your commit now introduces a gtk dependency in the sql backend
> while it was strictly gui independent before. I have postponed fixing bug
> 630770 [1] because I wanted to avoid adding gui code to the backend. My main
> reason for keeping the databackends free of gui code is that other programs
> may use this code, programs that aren't necessarily using gtk. The first
> example is CuteCash, a second example are the python bindings.
>
> I'm not sure what the best course of action is here. Silent data loss is a
> severe flaw, so perhaps it's better to have the introduction of a gtk
> dependency now so we can continue, and clean it up properly in the 2.5
> development cycle. Or perhaps the majority of the devs doesn't consider this
> an issue in which case nothing has to be done.
>
> Cleaning it up now would probably be challenging or too intrusive. When I was
> investigating a way to fix bug 630770 I came to the conclusion that backend
> errors are not reported back all the way into the GUI code. There were several
> in between layers that had to be altered for that.
>
> If the choice is to clean it up later, we best keep a bug report open for
> this.
>
> What do others think of this ?
Another option is using the GncBackendError (QofBackendError?) to pass
the error information back up the stack and have the application display
it.
Yet another option is to have a callback that the application can
register in with the backend for error propagation.
I agree that the backend should NOT depend on GTK.
> Geert
>
> [1] https://bugzilla.gnome.org/show_bug.cgi?id=630770
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list