Ticket #5575: OsbPlugin.patch

File OsbPlugin.patch, 985 bytes (added by BitSchupser, 14 years ago)
  • OsbPlugin.java

     
    2929
    3030import static org.openstreetmap.josm.tools.I18n.tr;
    3131
     32
    3233import javax.swing.ImageIcon;
    3334import javax.swing.JOptionPane;
    3435
     
    188189                    }
    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            }
    194201        }