comparison flys-aft/src/main/java/de/intevation/aft/Notification.java @ 4110:06891562e633

Extracted and documented the error messages of the process. flys-aft/trunk@4054 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 16 Feb 2012 11:26:56 +0000
parents da9df3641578
children f939e1e6cfa4
comparison
equal deleted inserted replaced
4109:8ba11e13ae8a 4110:06891562e633
63 63
64 try { 64 try {
65 URLConnection ucon = url.openConnection(); 65 URLConnection ucon = url.openConnection();
66 66
67 if (!(ucon instanceof HttpURLConnection)) { 67 if (!(ucon instanceof HttpURLConnection)) {
68 log.warn("'" + url + "' is not an HTTP(S) connection."); 68 log.warn("NOTIFY: '" + url + "' is not an HTTP(S) connection.");
69 return null; 69 return null;
70 } 70 }
71 71
72 HttpURLConnection con = (HttpURLConnection)ucon; 72 HttpURLConnection con = (HttpURLConnection)ucon;
73 73
82 out.flush(); 82 out.flush();
83 in = con.getInputStream(); 83 in = con.getInputStream();
84 result = XML.parseDocument(in); 84 result = XML.parseDocument(in);
85 } 85 }
86 catch (IOException ioe) { 86 catch (IOException ioe) {
87 log.error("Sending message to '" + url + "' failed.", ioe); 87 log.error("NOTIFY: Sending message to '" + url + "' failed.", ioe);
88 } 88 }
89 finally { 89 finally {
90 if (out != null) { 90 if (out != null) {
91 try { out.close(); } catch (IOException ioe) {} 91 try { out.close(); } catch (IOException ioe) {}
92 } 92 }

http://dive4elements.wald.intevation.org