- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 21 Sep 2009 12:43:34 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action In directory hutz:/tmp/cvs-serv3121/src/org/w3c/unicorn/action Modified Files: ObserveAction.java Log Message: adds all messages from UnicornCall to the response + checks that at least one observation has been made Index: ObserveAction.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/ObserveAction.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- ObserveAction.java 18 Sep 2009 14:57:58 -0000 1.35 +++ ObserveAction.java 21 Sep 2009 12:43:32 -0000 1.36 @@ -228,6 +228,13 @@ // Launch the observation try { aUnicornCall.doTask(); + messages.addAll(aUnicornCall.getMessages()); + + if (aUnicornCall.getResponses().size() == 0) { + Message mess = new Message(Message.Level.ERROR, "aucune observation", null); + createError(req, resp, reqParams, mess, mapOfSpecificParameter, mapOfOutputParameter); + } + createOutput(req, resp, mapOfStringObject, aUnicornCall, mapOfSpecificParameter, mapOfOutputParameter); } catch (final UnicornException ucnException) { Message mess;
Received on Monday, 21 September 2009 12:43:44 UTC