Ignore:
Timestamp:
2014-01-06T15:57:41+01:00 (10 years ago)
Author:
Don-vip
Message:

Improve handling of network errors at startup, suggest to change proxy settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/WikiReader.java

    r6380 r6642  
    1818    private final String baseurl;
    1919
     20    /**
     21     * Constructs a new {@code WikiReader} for the given base URL.
     22     * @param baseurl The wiki base URL
     23     */
    2024    public WikiReader(String baseurl) {
    2125        this.baseurl = baseurl;
     
    8084
    8185    private String readLang(URL url) throws IOException {
    82         BufferedReader in = Utils.openURLReader(url);
     86        BufferedReader in;
     87        try {
     88            in = Utils.openURLReader(url);
     89        } catch (IOException e) {
     90            Main.addNetworkError(url, Utils.getRootCause(e));
     91            throw e;
     92        }
    8393        try {
    8494            return readFromTrac(in, url);
     
    124134                // add a border="0" attribute to images, otherwise the internal help browser
    125135                // will render a thick  border around images inside an <a> element
    126                 //
    127136                b += line.replaceAll("<img ", "<img border=\"0\" ")
    128137                         .replaceAll("<span class=\"icon\">.</span>", "")
Note: See TracChangeset for help on using the changeset viewer.