The return of the missing prefs [message #381329] |
Wed, 26 November 2008 23:03 |
Guillaume Chatelet Messages: 146 Registered: July 2009 |
Senior Member |
|
|
Hello,
Within Eclipse, using the subclipse plugin I'm trying to resolve a
query. It fails while trying to read
..settings/org.eclipse.buckminster.core.prefs#HEAD which actually doesn't
exists. The .settings folder exists but not the pref file.
I tracked the bug down to this piece of code, in
/org.eclipse.buckminster.core/src/java/org/eclipse/buckminst er/core/reader/AbstractCatalogReader.java
l.88
> public synchronized IEclipsePreferences readBuckminsterPreferences(IProgressMonitor monitor) throws CoreException
> {
> if(m_prefStateKnown)
> {
> MonitorUtils.complete(monitor);
> return m_preferences;
> }
>
> try
> {
> m_preferences = readFile(EclipsePreferencesReader.BUCKMINSTER_PROJECT_PREFS_ PATH, EclipsePreferencesReader.INSTANCE, monitor);
> return m_preferences;
> }
> catch(FileNotFoundException e)
> {
> return null;
> }
> catch(IOException e)
> {
> throw BuckminsterException.wrap(e);
> }
> finally
> {
> m_prefStateKnown = true;
> }
> }
What is expected to happen is that readFile should fail and throw a
FileNotFoundException but actually this function throws an IOException
which cancels the resolution.
Actually this IOException is thrown from a much deeper piece of code, in
/org.eclipse.buckminster.subclipse/src/java/org/eclipse/buck minster/subclipse/internal/SvnRemoteFileReader.java,
function innerGetContents, l.219
In this function the line that throws the exception is the following (l.255)
input = clientAdapter.getContent(url, revision);
This lines throws a SVNClientException which is catched and rethrown as
IOException.
Thomas, I can fix this but I'm not sure where the fix should be ?
Best regards,
Guillaume
|
|
|
Re: The return of the missing prefs [message #381331 is a reply to message #381329] |
Thu, 27 November 2008 07:31 |
|
Hi Guillaume,
Guillaume Chatelet wrote:
> This lines throws a SVNClientException which is catched and rethrown as
> IOException.
>
> Thomas, I can fix this but I'm not sure where the fix should be ?
>
This is where you see exception messages in French that doesn't match any of the messages
that the catch code uses to trigger the FileNotFoundException, correct?
We are currently in progress of externalizing strings into message bundles. It seems to me
that what's needed here is the ability to add message bundles for other languages that
will match the exception messages. I don't know any other way since there's nothing else
to use to distinguish a missing entry from say, a network failure.
The externalization will be completed in a day or two. Meanwhile, perhaps you could track
down the source of the messages so that we have something to start with when adding other
languages?
Regards,
Thomas Hallgren
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05354 seconds