Skip to content

Commit

Permalink
Ignoring wiki errors
Browse files Browse the repository at this point in the history
  • Loading branch information
marigostra committed Mar 25, 2022
1 parent ed816dd commit 2d2cb9f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/org/luwrain/app/wiki/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@

public final class App extends AppBase<Strings> implements MonoApp
{
static private final String SETTINGS_PATH = "/org/luwrain/app/wiki";
static private final String
LOG_COMPONENT = "wiki",
SETTINGS_PATH = "/org/luwrain/app/wiki";

private final Gson gson = new Gson();
private Settings sett = null;
Expand Down Expand Up @@ -82,7 +84,13 @@ boolean search(String query)
for(Server s: servers)
{
final Mediawiki m = new Mediawiki(s.searchUrl);
try {
res.addAll(Arrays.asList(m.search(query)));
}
catch(Exception e)
{
Log.error(LOG_COMPONENT, "unable to fetch wiki pages from " + s.searchUrl);
}
}
finishedTask(taskId, ()->{
pages.clear();
Expand Down

0 comments on commit 2d2cb9f

Please sign in to comment.