Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343577 - Let pull fail gracefully when offline
Summary: Let pull fail gracefully when offline
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.1-M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-21 12:16 EDT by Benjamin Muskalla CLA
Modified: 2011-08-18 17:40 EDT (History)
1 user (show)

See Also:


Attachments
screenshot (17.60 KB, image/png)
2011-08-17 09:14 EDT, Benjamin Muskalla CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2011-04-21 12:16:46 EDT
1. be offline
2. Invoke Pull

Error dialog pops up with JGitInternalException. We should rather tell the user that there was something wrong with the remote or the user has no connection.

org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of fetch command
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:145)
at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:217)
at org.eclipse.egit.core.op.PullOperation$1.run(PullOperation.java:82)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957)
at org.eclipse.egit.core.op.PullOperation.execute(PullOperation.java:104)
at org.eclipse.egit.ui.internal.pull.PullOperationUI.execute(PullOperationUI.java:115)
at org.eclipse.egit.ui.internal.pull.PullOperationUI$1.run(PullOperationUI.java:90)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.TransportException: git://egit.eclipse.org/egit.git: unknown host
at org.eclipse.jgit.transport.TransportGitAnon.openConnection(TransportGitAnon.java:139)
at org.eclipse.jgit.transport.TransportGitAnon$TcpFetchConnection.<init>(TransportGitAnon.java:170)
at org.eclipse.jgit.transport.TransportGitAnon.openFetch(TransportGitAnon.java:111)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:125)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:111)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1062)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:136)
... 8 more
Comment 1 Benjamin Muskalla CLA 2011-08-17 09:14:50 EDT
Created attachment 201642 [details]
screenshot

Just happened again, pretty annoying as you think something bad happened.
Comment 2 Matthias Sohn CLA 2011-08-17 10:21:58 EDT
Pushed patch for review: http://egit.eclipse.org/r/4021
Comment 3 Benjamin Muskalla CLA 2011-08-18 17:40:45 EDT
Merged as 80201587deb426165eefc9b20dfa4fa8e9f482eb.

Thanks Matthias!