[Kmymoney] Graceful SQL error handling

Fernando Vilas fvilas at iname.com
Wed Apr 16 02:53:25 UTC 2014


On Tuesday, April 15, 2014 18:57:38 Phil Richardson wrote:
> So error handling seems to be something that needs a little improvement.
> 
> I use KMyMoney using MySQL. Both on windows as a client local to the
> network it is on, as well as remotely over a VPN on Ubuntu (though only
> very occasionally).
> 
> Windows being the primary client, I frequently have to swap between
> wireless and wired networks, as well as seeing the machine sleep.
> 
> The network switch is not smooth (damn Dell for not providing a combined
> network interface with shared MAC), so my IP will change during the
> interface swap. Sleeping will also obviously potentially cause long periods
> in which the TCP channel may close.
> 
> Overall, this leaves me with issues when I have KMyMoney open.
> 
> I may only occasionally get an exception window about the error, but near
> always, I find KMyMoney still wants to try and use the closed MySQL
> connection long after it is closed.
> 
> This can prompt the app to stall, not respond and otherwise act in an
> unfriendly way until I can close it.
> 
> Is there not more that can be done during a SQL driver exception, such as
> instantly close the application without any further attempts to use the
> closed socket?

It used to crash... The stall you are seeing should not be using the closed 
socket. Rather, it should be detecting that the connection was closed and 
attempting to open a new one. If that is not the case, it needs fixing...

Another option would be to percolate an error up the stack until the user is 
told that the connection was closed unexpectedly, and should be reinitiated 
manually from the menu.

Thoughts?

-- 
Thanks,
Fernando Vilas
fvilas at iname.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney/attachments/20140415/668bf9ad/attachment.sig>


More information about the KMyMoney mailing list