Ignore:
Timestamp:
2010-10-22T15:53:08+02:00 (14 years ago)
Author:
hampelratte
Message:

Ticket #5575: [patch] Adds a more usefull error message if UnknownHostException occurs when downloading (provided by BitSchupser)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbPlugin.java

    r23191 r23747  
    2929
    3030import static org.openstreetmap.josm.tools.I18n.tr;
     31
    3132
    3233import javax.swing.ImageIcon;
     
    189190                }
    190191            } catch (Exception e) {
    191                 JOptionPane.showMessageDialog(Main.parent, e.getMessage());
     192                if (e instanceof java.net.UnknownHostException) {
     193                    String message = String.format(tr("Unknown Host: %s - Possibly there is no connection to the Internet.")
     194                            , e.getMessage());
     195                    JOptionPane.showMessageDialog(Main.parent, message);
     196                } else {
     197                    JOptionPane.showMessageDialog(Main.parent, e.getMessage());
     198                }
    192199                e.printStackTrace();
    193200            }
Note: See TracChangeset for help on using the changeset viewer.