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

2006/unicorn/src/org/w3c/unicorn/response/impl DefaultResponseXBeans.java,1.13,1.14

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 23 Oct 2009 13:50:20 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1N1KX6-00076B-3w@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl
In directory hutz:/tmp/cvs-serv27273/src/org/w3c/unicorn/response/impl

Modified Files:
	DefaultResponseXBeans.java 
Log Message:
fixed exception identification and internationalized observerName where possible in messages

Index: DefaultResponseXBeans.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl/DefaultResponseXBeans.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- DefaultResponseXBeans.java	23 Oct 2009 13:24:41 -0000	1.13
+++ DefaultResponseXBeans.java	23 Oct 2009 13:50:18 -0000	1.14
@@ -55,9 +55,9 @@
 			ord = ObservationresponseDocument.Factory.parse(is, new XmlOptions().setCharacterEncoding(charset));
 			or = ord.getObservationresponse();
 			if (!or.validate())
-				throw new UnicornException(new org.w3c.unicorn.util.Message(2, "$message_response_validation_error", null, Framework.mapOfObserver.get(observerID).getName(Property.get("DEFAULT_LANGUAGE"))));
+				throw new UnicornException(new org.w3c.unicorn.util.Message(2, "$message_response_validation_error", null, Framework.mapOfObserver.get(observerID).getName(Property.get(getLang()))));
 		} catch (XmlException e) {
-			if (e.getMessage().contains("is not a valid observationresponse"))
+			if (e.getMessage().contains("document element namespace mismatch"))
 				throw new UnicornException(new org.w3c.unicorn.util.Message(org.w3c.unicorn.util.Message.ERROR, "$message_response_invalid_schema", null, Framework.mapOfObserver.get(observerID).getName(Property.get("DEFAULT_LANGUAGE"))));
 			else
 				throw new UnicornException(new org.w3c.unicorn.util.Message(e));
Received on Friday, 23 October 2009 13:50:21 UTC

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