kopia lustrzana https://github.com/JOSM/MapWithAI
FIXUP: Fix JOSM-20203
Just notify the user that there is a problem. Don't cause an exception. Signed-off-by: Taylor Smock <tsmock@fb.com>pull/1/head
rodzic
a9b06f09de
commit
451f0b5976
|
@ -37,7 +37,6 @@ import org.openstreetmap.josm.io.OsmTransferException;
|
||||||
import org.openstreetmap.josm.plugins.mapwithai.MapWithAIPlugin;
|
import org.openstreetmap.josm.plugins.mapwithai.MapWithAIPlugin;
|
||||||
import org.openstreetmap.josm.plugins.mapwithai.commands.MapWithAIAddCommand;
|
import org.openstreetmap.josm.plugins.mapwithai.commands.MapWithAIAddCommand;
|
||||||
import org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAILayerInfo;
|
import org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAILayerInfo;
|
||||||
import org.openstreetmap.josm.tools.JosmRuntimeException;
|
|
||||||
import org.openstreetmap.josm.tools.Logging;
|
import org.openstreetmap.josm.tools.Logging;
|
||||||
import org.openstreetmap.josm.tools.Utils;
|
import org.openstreetmap.josm.tools.Utils;
|
||||||
|
|
||||||
|
@ -167,7 +166,10 @@ public final class MapWithAIDataUtils {
|
||||||
notification.setContent(tr("MapWithAI servers may be down."));
|
notification.setContent(tr("MapWithAI servers may be down."));
|
||||||
GuiHelper.runInEDT(notification::show);
|
GuiHelper.runInEDT(notification::show);
|
||||||
} else {
|
} else {
|
||||||
throw new JosmRuntimeException(e);
|
Logging.error(e);
|
||||||
|
Notification notification = new Notification();
|
||||||
|
notification.setContent(e.getLocalizedMessage());
|
||||||
|
GuiHelper.runInEDT(notification::show);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
Ładowanie…
Reference in New Issue