Community
Participate
Working Groups
0531 add bookmark to http://klicnik/eclipseFixes/ Alphabet Soup Site Search for my.alphabet_1.0.0 You should be prompted for userid/paswd for the EclipseFixes site Click cancel The error dialog opens. the search stops Maybe we should continue ? what if one of the bookmark site is down ?
*** Bug 22190 has been marked as a duplicate of this bug. ***
do you know when you will have a version of this for us to test. We are entering a test pass at the end of the week and need the update to work
The general problem here is that all the problems that can happen as when asking for a site using the URL are lumped together and reported by throwing a CoreException. This way, the UI cannot tell if the problem is an internal error (that should correctly stop the search) or a legal URL issue that should not cause the operation to terminate prematurely. A possible fix for this would be: 1) Update Core identifies cases where connection fails and throws ConnectionFailedException or similar. This exception is a subclass of CoreException. 2) Update UI catches ConnectionFailedException and silently continues the search but allows CoreExceptions to pass through, causing the search to continue. Since 1) requires API modification that we would not like to do in 2.0.1, a simpler alternative is for Core to set the result code to a well know value, indicating UI what is the problem. For example, set it to 42 for connection problems: try { // try to get the site given the URL catch (CoreException e) { if (e.getStatus().getCode()!=42) throw e; } This way, connection-related exception will 'fall through' and real problems will cause search to terminate with an error message.
Christophe, if even setting the result code is too much trouble, take a look at the following line: ISite site = SiteManager.getSite(siteURL); This is line 290 in 'SearchObject.java' in Update UI. If anything goes wrong with this call, Update Core will throw CoreException that will cause search to stop. If this call is enclosed in a try/catch block and we silently ignore the failure and move on to the next search task, will we make a mistake by ignoring possibly fatal exceptions?
Answer Yes as it is the entry point ot obtain a Site Setting a known Value seems possible.
Added code in 2.0.1 stream
Added Update UI code in 2.0.1 stream
tested in 2.0.1, Fixed minor bug when returning multiple status. Released code in 2.0.1 Stream. version r201_v20020809H0700 can we get a trace result of each search so we know what happened for each site like Start searching at <time> Searching... site1. found 2 new features Searhcing... site2. Failed to access site Searching... site3. No new features found Finished searching. at <time>
Are you proposing to support tracing and introduce tracing options that can control trace printing of the search progress for the debugging purposes?
I propose a UI trace so the user knows what happened during a UI search. This not a debug trace. Look at Symantec Live Update, it logs what server it connected to, if it was sucessfull or not and what it found. As a user it will help me realize if teh server was down and I should retry later or if no update were found
A trace would not be in Eclipse spirit (we use console for output, log files for errors etc.). But I can see the value of informing the user of abnormal events. What we can do is collect these events during the search and present them to the user in a message dialog at the end. Something like: There were connection failures during the search. If you press the 'Details' button, you can see the list of failures, including status messages etc. You still get your trace, but it is displayed using Eclipse standard practice for problem details.
Implemented. Status objects that are collected when connection problem exceptions are thrown are kept in a list until the end of the search. At that point, a multi-status object is created and a new core exception is thrown. This causes the error message to show up with the text: Network connection problems encountered during the search. Pressing on the 'Details' button shows the exact problems.