git://git.nikiroo.be
/
gofetch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
75f6f0c
)
Skip bad stories instead of aborting the process
author
Niki Roo
<niki@nikiroo.be>
Thu, 22 Mar 2018 07:33:18 +0000
(08:33 +0100)
committer
Niki Roo
<niki@nikiroo.be>
Thu, 22 Mar 2018 07:33:18 +0000
(08:33 +0100)
src/be/nikiroo/gofetch/Fetcher.java
patch
|
blob
|
blame
|
history
diff --git
a/src/be/nikiroo/gofetch/Fetcher.java
b/src/be/nikiroo/gofetch/Fetcher.java
index bd5a4543fda92a92da61d665205fb5744364b217..258f1961e58b8746b8286f7131726d2e9de659d3 100644
(file)
--- a/
src/be/nikiroo/gofetch/Fetcher.java
+++ b/
src/be/nikiroo/gofetch/Fetcher.java
@@
-147,12
+147,20
@@
public class Fetcher {
// Get comments (and update stories if needed):
int i = 1;
// Get comments (and update stories if needed):
int i = 1;
+ List<Story> fetchedStories = new ArrayList<Story>(stories.size());
for (Story story : stories) {
for (Story story : stories) {
- System.err.print
ln
(String.format("%02d/%02d", i, stories.size())
+ System.err.print(String.format("%02d/%02d", i, stories.size())
+ " Fetching full story " + story.getId() + "...");
+ " Fetching full story " + story.getId() + "...");
- support.fetch(story);
+ try {
+ support.fetch(story);
+ fetchedStories.add(story);
+ System.err.println();
+ } catch (IOException e) {
+ System.err.println(" Failed to get story!");
+ }
i++;
}
i++;
}
+ stories = fetchedStories;
Output gopher = new Gopher(support.getType(), hostname, preselector,
port);
Output gopher = new Gopher(support.getType(), hostname, preselector,
port);