W3C home > Mailing lists > Public > www-validator-cvs@w3.org > October 2009

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

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 05 Oct 2009 14:25:43 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MuoVT-0003um-Ql@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/request
In directory hutz:/tmp/cvs-serv14938/src/org/w3c/unicorn/request

Modified Files:
	URIRequest.java 
Log Message:
simpler way to make the Message level enum

Index: URIRequest.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/request/URIRequest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- URIRequest.java	30 Sep 2009 16:29:50 -0000	1.10
+++ URIRequest.java	5 Oct 2009 14:25:41 -0000	1.11
@@ -131,9 +131,9 @@
 			int responseCode = aURLConnection.getResponseCode();
 			switch (responseCode) {
 			case HttpURLConnection.HTTP_NOT_FOUND:
-				throw new UnicornException(Message.Level.ERROR, "$message_observer_not_found " + Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]), null);
+				throw new UnicornException(Message.ERROR, "$message_observer_not_found " + Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]), null);
 			case HttpURLConnection.HTTP_INTERNAL_ERROR:
-				throw new UnicornException(Message.Level.ERROR, "$message_observer_internal_error " + Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]), null);
+				throw new UnicornException(Message.ERROR, "$message_observer_internal_error " + Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]), null);
 			}
 			
 			InputStream is = aURLConnection.getInputStream();
@@ -143,12 +143,12 @@
 		} catch (MalformedURLException e) {
 			throw new UnicornException(new Message(e));
 		} catch (ConnectException e) {
-			throw new UnicornException(Message.Level.ERROR, "$message_observer_connect_exception " + Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]), null);
+			throw new UnicornException(Message.ERROR, "$message_observer_connect_exception " + Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]), null);
 		} catch (SocketTimeoutException e) {
 			if (e.getMessage().contains("connect timed out")) {
-				throw new UnicornException(Message.Level.ERROR, "$message_observer_connect_exception " + Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]), null);
+				throw new UnicornException(Message.ERROR, "$message_observer_connect_exception " + Framework.mapOfObserver.get(observerId).getName(sLang.split(",")[0]), null);
 			} else if (e.getMessage().contains("Read timed out")) {
-				throw new UnicornException(Message.Level.ERROR, "$message_observer_read_timeout", null);
+				throw new UnicornException(Message.ERROR, "$message_observer_read_timeout", null);
 			} else {
 				throw new UnicornException(new Message(e));
 			}
Received on Monday, 5 October 2009 14:25:45 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:39 UTC