Reported by jteh on 2009-11-27 05:49
A user reported that NVDA 2009.1 wouldn't start on his system. The log revealed that creating the UI Automation client object threw a "class not registered" error. While this is almost certainly due to brokenness on the system (maybe a broken install of the Platform Update?), UI Automation isn't essential and we can probably get away with just logging an error if it fails to initialise.
There are two ways we can do this (if we choose to do it at all):
Catch any exceptions in UIAHandler.initialize() and log them there; or
Catch exceptions from UIAHandler.initialize() in core.main() and log the error there.
Personally, I probaby prefer option 2, as initialisation really did fail, so core should know about it. Having said that, initialize() doesn't do anything special if UIA wasn't present, which makes this argument less valid.
The text was updated successfully, but these errors were encountered:
Comment 1 by mdcurran on 2009-11-27 06:26
I think I am for a try ... except around UIAHandler.initialize in core.main. Its possible we actually should do the same for java access bridge really. Rather than just pretending it worked.
Comment 2 by jteh on 2009-11-27 06:29
So if UIA really isn't available at all, should it raise an exception too, rather than just pretending it succeeded as it does now? One issue is that UIA failing because of "class not registered" or some such is really an error, whereas it not being available isn't an error. We don't want to log an error in the latter case, but do we want to for the former?
Comment 3 by mdcurran on 2009-11-27 06:33
I assume you think that class not registered is more of an error than the dll just not existing because if the dll exists it should be registered?
I personally think it should also throw an error if the dll does not exist, perhaps NotImplementedError? and make initialization of APIs a little more standard.
Comment 4 by jteh (in reply to comment 3) on 2009-11-27 06:36
Replying to mdcurran:
I assume you think that class not registered is more of an error than the dll just not existing because if the dll exists it should be registered?
Correct.
I personally think it should also throw an error if the dll does not exist, perhaps !NotImplementedError?
That's fine with me. However, the question then is: should we special case !NotImplementedError and not log an error in that case? (Perhaps log info or warning, but not an error.) So, the code would look something like:
Reported by jteh on 2009-11-27 05:49
A user reported that NVDA 2009.1 wouldn't start on his system. The log revealed that creating the UI Automation client object threw a "class not registered" error. While this is almost certainly due to brokenness on the system (maybe a broken install of the Platform Update?), UI Automation isn't essential and we can probably get away with just logging an error if it fails to initialise.
There are two ways we can do this (if we choose to do it at all):
UIAHandler.initialize()
and log them there; orUIAHandler.initialize()
incore.main()
and log the error there.Personally, I probaby prefer option 2, as initialisation really did fail, so core should know about it. Having said that, initialize() doesn't do anything special if UIA wasn't present, which makes this argument less valid.
The text was updated successfully, but these errors were encountered: