2006/unicorn/src/org/w3c/unicorn/request URIRequest.java,1.11,1.12

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/request
In directory hutz:/tmp/cvs-serv32028/src/org/w3c/unicorn/request

Modified Files:
	URIRequest.java 
Log Message:
new UnicornException methods

Index: URIRequest.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/request/URIRequest.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- URIRequest.java	5 Oct 2009 14:25:41 -0000	1.11
+++ URIRequest.java	6 Oct 2009 10:03:24 -0000	1.12
@@ -113,6 +113,7 @@
 		logger.trace("doRequest");
 		logger.debug("URL : " + this.sURL + " .");
 		logger.debug("Parameters : " + this.sParameter + " .");
+		String observerName = Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]);
 		final URL aURL;
 		try {
 			if (null == this.sParameter) {
@@ -131,9 +132,9 @@
 			int responseCode = aURLConnection.getResponseCode();
 			switch (responseCode) {
 			case HttpURLConnection.HTTP_NOT_FOUND:
-				throw new UnicornException(Message.ERROR, "$message_observer_not_found " + Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]), null);
+				throw new UnicornException(Message.ERROR, "$message_observer_not_found", null, observerName);
 			case HttpURLConnection.HTTP_INTERNAL_ERROR:
-				throw new UnicornException(Message.ERROR, "$message_observer_internal_error " + Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]), null);
+				throw new UnicornException(Message.ERROR, "$message_observer_internal_error", null, observerName);
 			}
 			
 			InputStream is = aURLConnection.getInputStream();
@@ -143,12 +144,12 @@
 		} catch (MalformedURLException e) {
 			throw new UnicornException(new Message(e));
 		} catch (ConnectException e) {
-			throw new UnicornException(Message.ERROR, "$message_observer_connect_exception " + Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]), null);
+			throw new UnicornException(Message.ERROR, "$message_observer_connect_exception", null, observerName);
 		} catch (SocketTimeoutException e) {
 			if (e.getMessage().contains("connect timed out")) {
-				throw new UnicornException(Message.ERROR, "$message_observer_connect_exception " + Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]), null);
+				throw new UnicornException(Message.ERROR, "$message_observer_connect_exception", null, observerName);
 			} else if (e.getMessage().contains("Read timed out")) {
-				throw new UnicornException(Message.ERROR, "$message_observer_read_timeout", null);
+				throw new UnicornException(Message.ERROR, "$message_observer_read_timeout");
 			} else {
 				throw new UnicornException(new Message(e));
 			}

Received on Tuesday, 6 October 2009 10:03:30 UTC