﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6982	broken TMS url leads to exceptions	alv	Don-vip	"Steps to reproduce: In preferences, add a TMS layer. Instead of {zoom} you write {z} - a mistake made easily, when you, for example, copied the url from a web page where it was with ""$z"". Then enable the layer. Result: JOSM complains about unhandled exceptions several times in a row - and later every time the view changes:

{{{
java.lang.IllegalArgumentException: can't parse argument number z
	at java.text.MessageFormat.makeFormat(MessageFormat.java:1339)
	at java.text.MessageFormat.applyPattern(MessageFormat.java:458)
	at java.text.MessageFormat.<init>(MessageFormat.java:350)
	at java.text.MessageFormat.format(MessageFormat.java:811)
	at org.openstreetmap.josm.tools.I18n.tr(I18n.java:151)
	at org.openstreetmap.josm.gui.layer.TMSLayer.paintTileText(TMSLayer.java:847)
	at org.openstreetmap.josm.gui.layer.TMSLayer.paint(TMSLayer.java:1212)
	at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:451)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:530)
}}}

What should happen: show an error tile, that the url couldn't be parsed. Or that there's no tile at "".../{zoom}/..."""	defect	closed	normal		Core	latest	fixed	tms input validation	
