Revision 41285 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.remoteclient/src/main/java/org/gvsig/remoteclient/wms/WMSProtocolHandlerFactory.java

View differences:

WMSProtocolHandlerFactory.java
36 36
import org.xmlpull.v1.XmlPullParserException;
37 37

  
38 38
import org.gvsig.remoteclient.utils.CapabilitiesTags;
39
import org.slf4j.Logger;
40
import org.slf4j.LoggerFactory;
39 41

  
40
/**
41
 * <p></p>
42
 *
43
 */
44 42
public class WMSProtocolHandlerFactory {
45
/**
46
 * <p></p>
47
 *
48
 */
43
    
44
    private static final Logger logger = LoggerFactory.getLogger(WMSProtocolHandlerFactory.class);
49 45
    public org.gvsig.remoteclient.wms.WMSProtocolHandler wMSProtocolHandler;
50 46

  
51 47
    private static ArrayList supportedVersions = new ArrayList();
......
163 159
        }
164 160
        catch(Exception e)
165 161
        {
166
        	e.printStackTrace();
167
        	return null;
162
                logger.warn("Can't determine server version",e);
163
          	return null;
168 164
        }
169 165
    }
170 166

  
......
232 228
		}
233 229
		catch(XmlPullParserException xmlEx)
234 230
		{
235
			xmlEx.printStackTrace();
231
                        logger.warn("Can't determine server version",xmlEx);
236 232
			return "";
237 233
		}
238 234
		finally{
......
241 237
				try{
242 238
					reader.close();
243 239
				}catch(Exception ex){
244
					ex.printStackTrace();
240
                                        logger.warn("Can't close reader",ex);
245 241
				}
246 242
			}
247 243
			if (dis != null)
......
249 245
				try {
250 246
					dis.close();
251 247
				} catch(Exception ex) {
252
					ex.printStackTrace();
248
                                        logger.warn("Can't close input stream",ex);
253 249
				}
254 250
			}
255 251
		}
......
272 268
         }
273 269
         catch (Exception e)
274 270
         {
275
        	 e.printStackTrace();
271
                logger.warn("Can't create WMS protocol handler for version '"+version+"'.",e);
276 272
           //throw new Exception("WMSDriverFactory. Unknown driver version " + e);
277 273
        	 return null;
278 274
         }

Also available in: Unified diff