Ignore:
Timestamp:
2017-08-22T22:26:32+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate all Main logging methods and introduce suitable replacements in Logging for most of them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java

    r12537 r12620  
    5252import org.openstreetmap.josm.tools.InputMapUtils;
    5353import org.openstreetmap.josm.tools.LanguageInfo.LocaleType;
     54import org.openstreetmap.josm.tools.Logging;
    5455import org.openstreetmap.josm.tools.OpenBrowser;
    5556import org.openstreetmap.josm.tools.WindowGeometry;
     
    142143            css = new String(cf.getByteContent(), StandardCharsets.ISO_8859_1);
    143144        } catch (IOException e) {
    144             Main.error(tr("Failed to read CSS file ''help-browser.css''. Exception is: {0}", e.toString()));
    145             Main.error(e);
     145            Logging.error(tr("Failed to read CSS file ''help-browser.css''. Exception is: {0}", e.toString()));
     146            Logging.error(e);
    146147            return ss;
    147148        }
     
    236237            help.getEditorKit().read(new StringReader(content), document, 0);
    237238        } catch (IOException | BadLocationException e) {
    238             Main.error(e);
     239            Logging.error(e);
    239240        }
    240241        help.setDocument(document);
     
    300301            content = reader.fetchHelpTopicContent(url, true);
    301302        } catch (MissingHelpContentException e) {
    302             Main.trace(e);
     303            Logging.trace(e);
    303304            url = getHelpTopicUrl(buildAbsoluteHelpTopic(relativeHelpTopic, LocaleType.BASELANGUAGE));
    304305            try {
    305306                content = reader.fetchHelpTopicContent(url, true);
    306307            } catch (MissingHelpContentException e1) {
    307                 Main.trace(e1);
     308                Logging.trace(e1);
    308309                url = getHelpTopicUrl(buildAbsoluteHelpTopic(relativeHelpTopic, LocaleType.ENGLISH));
    309310                try {
    310311                    content = reader.fetchHelpTopicContent(url, true);
    311312                } catch (MissingHelpContentException e2) {
    312                     Main.debug(e2);
     313                    Logging.debug(e2);
    313314                    this.url = url;
    314315                    handleMissingHelpContent(relativeHelpTopic);
    315316                    return;
    316317                } catch (HelpContentReaderException e2) {
    317                     Main.error(e2);
     318                    Logging.error(e2);
    318319                    handleHelpContentReaderException(relativeHelpTopic, e2);
    319320                    return;
    320321                }
    321322            } catch (HelpContentReaderException e1) {
    322                 Main.error(e1);
     323                Logging.error(e1);
    323324                handleHelpContentReaderException(relativeHelpTopic, e1);
    324325                return;
    325326            }
    326327        } catch (HelpContentReaderException e) {
    327             Main.error(e);
     328            Logging.error(e);
    328329            handleHelpContentReaderException(relativeHelpTopic, e);
    329330            return;
     
    346347            content = reader.fetchHelpTopicContent(url, true);
    347348        } catch (MissingHelpContentException e) {
    348             Main.debug(e);
     349            Logging.debug(e);
    349350            this.url = url;
    350351            handleMissingHelpContent(absoluteHelpTopic);
    351352            return;
    352353        } catch (HelpContentReaderException e) {
    353             Main.error(e);
     354            Logging.error(e);
    354355            handleHelpContentReaderException(absoluteHelpTopic, e);
    355356            return;
     
    377378                this.url = url;
    378379            } catch (HelpContentReaderException e) {
    379                 Main.warn(e);
     380                Logging.warn(e);
    380381                HelpAwareOptionPane.showOptionDialog(
    381382                        Main.parent,
     
    587588                    }
    588589                } catch (BadLocationException e) {
    589                     Main.warn(tr("Bad location in HTML document. Exception was: {0}", e.toString()));
    590                     Main.error(e);
     590                    Logging.warn(tr("Bad location in HTML document. Exception was: {0}", e.toString()));
     591                    Logging.error(e);
    591592                }
    592593            }
Note: See TracChangeset for help on using the changeset viewer.