diff --git a/wms/src/main/java/uk/ac/rdg/resc/edal/wms/GetMapStyleParams.java b/wms/src/main/java/uk/ac/rdg/resc/edal/wms/GetMapStyleParams.java index 4043e1b5b..787bebf81 100644 --- a/wms/src/main/java/uk/ac/rdg/resc/edal/wms/GetMapStyleParams.java +++ b/wms/src/main/java/uk/ac/rdg/resc/edal/wms/GetMapStyleParams.java @@ -41,6 +41,8 @@ import org.apache.commons.io.IOUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import uk.ac.rdg.resc.edal.domain.Extent; import uk.ac.rdg.resc.edal.exceptions.EdalException; import uk.ac.rdg.resc.edal.graphics.exceptions.EdalLayerNotFoundException; @@ -80,6 +82,8 @@ public class GetMapStyleParams { /* true if we are using an XML style specification */ private MapImage xmlMapImage = null; + private static final Logger log = LoggerFactory.getLogger(GetMapStyleParams.class); + /** * Extract GetMap parameters from the URL, using a {@link WmsCatalogue} to * determine default values. @@ -138,8 +142,9 @@ public GetMapStyleParams(RequestParams params, WmsCatalogue catalogue) throws Ed IOUtils.copy(is, writer); xmlStyle = writer.toString(); } catch (IOException e) { - throw new EdalException( - "SLD argument specified, but SLD could not be read from URL: " + xmlLoc, e); + String partialMsg = "SLD argument specified, but SLD could not be read"; + log.warn("{} from the URL: {}", partialMsg, xmlLoc, e); + throw new EdalException(partialMsg + "."); } } else { /*