On 10/19/2010 09:08 AM, Pavel Sanda wrote:
v...@lyx.org wrote:
Author: vfr
Date: Tue Oct 19 12:42:54 2010
New Revision: 35714
URL: http://www.lyx.org/trac/changeset/35714

Log:
Fix bug #6950: Cursor remains in waiting state after incompatible command.

P.S. How do we prevent other cases like this? By throwing exceptions, we never 
know whether it's assured that we will return to the function to call 
setBusy(false). In JAVA you always have to either make a function throwable or 
to catch the exception, but AFAICS you have to crawl through the code to find 
out whether a function can throw an exception.
exceptions should be thrown only in exceptional states, where we can suffer (ie 
wontfix) sideeffects like broken cursor (better than crash).
if the exception happens as part of normal 'result' it should be returned as 
normal reult of function.
of course imho.

We had this discussion recently, when I introduced an exception in math processing. There are real downsides to this of a return value. Granted, C++ provides less support for the use of "normal" exceptions than Java or Python does.

Richard

Reply via email to